-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathzego_express_defines.dart
6190 lines (4910 loc) Β· 246 KB
/
zego_express_defines.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import 'package:flutter/material.dart';
import 'dart:typed_data';
// ignore_for_file: unnecessary_this, non_constant_identifier_names
/// Room scenario.
enum ZegoScenario {
/// [Deprecated] Legacy general scenario, this scenario has been deprecated since version 3.0.0, and it is not recommended to use, please migrate to other new scenario as soon as possible.
@Deprecated('Legacy general scenario')
General,
/// [Deprecated] Legacy communication scenario, this scenario has been deprecated since version 3.0.0, and it is not recommended to use, please migrate to other new scenario as soon as possible.
@Deprecated('Legacy communication scenario')
Communication,
/// [Deprecated] Legacy live broadcast scenario, this scenario has been deprecated since version 3.0.0, and it is not recommended to use, please migrate to other new scenario as soon as possible.
@Deprecated('Legacy live broadcast scenario')
Live,
/// Available since: 3.0.0. Description: The default (generic) scenario. If none of the following scenarios conform to your actual application scenario, this default scenario can be used.
Default,
/// Available since: 3.0.0. Description: Standard video call scenario, it is suitable for one-to-one video call scenarios.
StandardVideoCall,
/// Available since: 3.0.0. Description: High quality video call scenario, it is similar to the standard video call scenario, but this scenario uses a higher video frame rate, bit rate, and resolution (540p) by default, which is suitable for video call scenario with high image quality requirements.
HighQualityVideoCall,
/// Available since: 3.0.0. Description: Standard chatroom scenario, suitable for multi-person pure voice calls (low data usage). Note: On the ExpressVideo SDK, the camera is not enabled by default in this scenario.
StandardChatroom,
/// Available since: 3.0.0. Description: High quality chatroom scenario, it is similar to the standard chatroom scenario, but this scenario uses a higher audio bit rate than the standard chatroom scenario by default. It is suitable for multi-person pure voice call scenarios with high requirements on sound quality. Note: On the ExpressVideo SDK, the camera is not enabled by default in this scenario. The web platform does not currently support this scenario.
HighQualityChatroom,
/// Available since: 3.0.0. Description: Live broadcast scenario, it is suitable for one-to-many live broadcast scenarios such as shows, games, e-commerce, and large educational classes. The audio and video quality, fluency, and compatibility have been optimized. Note: Even in live broadcast scenarios, the SDK has no business "roles" (such as anchors and viewers), and all users in the room can publish and play streams.
Broadcast,
/// Available since: 3.0.0. Description: Karaoke (KTV) scenario, it is suitable for real-time chorus and online karaoke scenarios, and has optimized delay, sound quality, ear return, echo cancellation, etc., and also ensures accurate alignment and ultra-low delay when multiple people chorus. The web platform does not currently support this scenario.
Karaoke,
/// Available since: 3.3.0. Description: Standard voice call scenario, it is suitable for one-to-one video or voice call scenarios. Note: On the ExpressVideo SDK, the camera is not enabled by default in this scenario. The web platform does not currently support this scenario.
StandardVoiceCall
}
/// SDK feature type.
enum ZegoFeatureType {
/// Basic audio feature.
Audio,
/// Basic video feature.
Video,
/// Media player feature.
MediaPlayer,
/// Local media data recorder feature.
MediaDataRecorder,
/// Media data publisher feature.
MediaDataPublisher,
/// Supplemental Enhancement Information (media side info) feature.
SEI,
/// SDK video capture feature.
SdkVideoCapture,
/// Custom video capture feature.
CustomVideoCapture,
/// SDK video rendering feature.
SdkVideoRender,
/// Custom video rendering feature.
CustomVideoRender,
/// SDK video processing feature (including low-light enhancement feature).
SdkVideoProcessing,
/// Custom video processing feature.
CustomVideoProcessing,
/// Streaming encryption / decryption feature.
StreamEncryption,
/// RTMP streaming feature.
Rtmp,
/// RTMPS streaming feature.
Rtmps,
/// RTMP over QUIC streaming feature.
RtmpOverQuic,
/// RTMP streaming feature.
HttpFlv,
/// HTTPS-FLV streaming feature.
HttpsFlv,
/// HTTP-FLV over QUIC streaming feature.
HttpFlvOverQuic,
/// Super resolution imaging feature.
SuperResolution,
/// Effects beauty feature.
EffectsBeauty,
/// Whiteboard beauty feature.
Whiteboard,
/// Range audio feature.
RangeAudio,
/// Copy righted music feature.
CopyRightedMusic,
/// Video object segmentation feature.
VideoObjectSegmentation,
/// Range scene feature. (3.0.0 and above support)
RangeScene,
/// Screen capture feature. (3.1.0 and above support)
ScreenCapture,
/// AI voice changer feature. (3.8.0 and above support)
AIVoiceChanger
}
/// Language.
enum ZegoLanguage {
/// English
English,
/// Chinese
Chinese
}
/// Room mode.
enum ZegoRoomMode {
/// Single room mode.
SingleRoom,
/// Multiple room mode.
MultiRoom
}
/// Geo fence type.
enum ZegoGeoFenceType {
/// Not use geo fence.
None,
/// Include the specified geo fence areas.
Include,
/// Exclude the specified geo fence areas.
Exclude
}
/// Geo fence area code.
class ZegoGeoFenceAreaCode {
/// Chinese mainland (excluding Hong Kong, Macao and Taiwan).
static const int CN = 2;
/// North America.
static const int NA = 3;
/// Europe, including the UK.
static const int EU = 4;
/// Asia, excluding Chinese mainland and India.
static const int AS = 5;
/// India.
static const int IN = 6;
}
/// engine state.
enum ZegoEngineState {
/// The engine has started
Start,
/// The engine has stoped
Stop
}
/// Room state.
enum ZegoRoomState {
/// Unconnected state, enter this state before logging in and after exiting the room. If there is a steady state abnormality in the process of logging in to the room, such as AppID or Token are incorrect, or if the same user name is logged in elsewhere and the local end is KickOut, it will enter this state.
Disconnected,
/// The state that the connection is being requested. It will enter this state after successful execution login room function. The display of the UI is usually performed using this state. If the connection is interrupted due to poor network quality, the SDK will perform an internal retry and will return to the requesting connection status.
Connecting,
/// The status that is successfully connected. Entering this status indicates that the login to the room has been successful. The user can receive the callback notification of the user and the stream information in the room.
Connected
}
/// Room state change reason.
enum ZegoRoomStateChangedReason {
/// Logging in to the room. When calling [loginRoom] to log in to the room or [switchRoom] to switch to the target room, it will enter this state, indicating that it is requesting to connect to the server. The application interface is usually displayed through this state.
Logining,
/// Log in to the room successfully. When the room is successfully logged in or switched, it will enter this state, indicating that the login to the room has been successful, and users can normally receive callback notifications of other users in the room and all stream information additions and deletions.
Logined,
/// Failed to log in to the room. When the login or switch room fails, it will enter this state, indicating that the login or switch room has failed, for example, AppID or Token is incorrect, etc.
LoginFailed,
/// The room connection is temporarily interrupted. If the interruption occurs due to poor network quality, the SDK will retry internally.
Reconnecting,
/// The room is successfully reconnected. If there is an interruption due to poor network quality, the SDK will retry internally, and enter this state after successful reconnection.
Reconnected,
/// The room fails to reconnect. If there is an interruption due to poor network quality, the SDK will retry internally, and enter this state after the reconnection fails.
ReconnectFailed,
/// Kicked out of the room by the server. For example, if you log in to the room with the same user name in other places, and the local end is kicked out of the room, it will enter this state.
KickOut,
/// Logout of the room is successful. It is in this state by default before logging into the room. When calling [logoutRoom] to log out of the room successfully or [switchRoom] to log out of the current room successfully, it will enter this state.
Logout,
/// Failed to log out of the room. Enter this state when calling [logoutRoom] fails to log out of the room or [switchRoom] fails to log out of the current room internally.
LogoutFailed
}
/// Room mode.
enum ZegoRoomTransparentMessageMode {
/// Single room mode.
OnlyClient,
/// Multiple room mode.
OnlyServer,
/// Multiple room mode.
ClientAndServer
}
/// Room mode.
enum ZegoRoomTransparentMessageType {
/// Single room mode.
ZegoRoomTransparentMessageNormal,
/// Multiple room mode.
ZegoRoomTransparentMessageSequence
}
/// Publish channel.
enum ZegoPublishChannel {
/// The main (default/first) publish channel.
Main,
/// The auxiliary (second) publish channel
Aux,
/// The third publish channel
Third,
/// The fourth publish channel
Fourth
}
/// Publish CensorshipMode.
enum ZegoStreamCensorshipMode {
/// no censorship.
None,
/// only censorship stream audio.
Audio,
/// only censorship stream video.
Video,
/// censorship stream audio and video.
AudioAndVideo
}
/// Type of capability negotiation for publish stream references.
enum ZegoCapabilityNegotiationType {
/// no reference to the outcome of the capability negotiation.
None,
/// refer to the outcome of the capability negotiation of all user in the room.
All,
/// refer to the outcome of the capability negotiation of publisher in the room.
Publisher
}
/// Video rendering fill mode.
enum ZegoViewMode {
/// The proportional scaling up, there may be black borders
AspectFit,
/// The proportional zoom fills the entire View and may be partially cut
AspectFill,
/// Fill the entire view, the image may be stretched
ScaleToFill
}
/// Mirror mode for previewing or playing the of the stream.
enum ZegoVideoMirrorMode {
/// The mirror image only for previewing locally. This mode is used by default. When the mobile terminal uses a rear camera, this mode is still used by default, but it does not work. Local preview does not set mirroring.
OnlyPreviewMirror,
/// Both the video previewed locally and the far end playing the stream will see mirror image.
BothMirror,
/// Both the video previewed locally and the far end playing the stream will not see mirror image.
NoMirror,
/// The mirror image only for far end playing the stream.
OnlyPublishMirror
}
/// SEI type
enum ZegoSEIType {
/// Using H.264 SEI (nalu type = 6, payload type = 243) type packaging, this type is not specified by the SEI standard, there is no conflict with the video encoder or the SEI in the video file, users do not need to follow the SEI content Do filtering, SDK uses this type by default.
ZegoDefined,
/// SEI (nalu type = 6, payload type = 5) of H.264 is used for packaging. The H.264 standard has a prescribed format for this type: startcode + nalu type (6) + payload type (5) + len + payload (uuid + content) + trailing bits. Because the video encoder itself generates an SEI with a payload type of 5, or when a video file is used for streaming, such SEI may also exist in the video file, so when using this type, the user needs to use uuid + context as a buffer sending SEI. At this time, in order to distinguish the SEI generated by the video encoder itself, when the App sends this type of SEI, it can fill in the service-specific uuid (uuid length is 16 bytes). When the receiver uses the SDK to parse the SEI of the payload type 5, it will set filter string filters out the SEI matching the uuid and throws it to the business. If the filter string is not set, the SDK will throw all received SEI to the developer. uuid filter string setting function, [ZegoEngineConfig.advancedConfig("unregister_sei_filter","XXXXXX")], where unregister_sei_filter is the key, and XXXXX is the uuid filter string to be set.
UserUnregister
}
/// Publish stream status.
enum ZegoPublisherState {
/// The state is not published, and it is in this state before publishing the stream. If a steady-state exception occurs in the publish process, such as AppID or Token are incorrect, or if other users are already publishing the stream, there will be a failure and enter this state.
NoPublish,
/// The state that it is requesting to publish the stream after the [startPublishingStream] function is successfully called. The UI is usually displayed through this state. If the connection is interrupted due to poor network quality, the SDK will perform an internal retry and will return to the requesting state.
PublishRequesting,
/// The state that the stream is being published, entering the state indicates that the stream has been successfully published, and the user can communicate normally.
Publishing
}
/// Voice changer preset value.
enum ZegoVoiceChangerPreset {
/// No Voice changer
None,
/// Male to child voice (loli voice effect)
MenToChild,
/// Male to female voice (kindergarten voice effect)
MenToWomen,
/// Female to child voice
WomenToChild,
/// Female to male voice
WomenToMen,
/// Foreigner voice effect
Foreigner,
/// Autobot Optimus Prime voice effect
OptimusPrime,
/// Android robot voice effect
Android,
/// Ethereal voice effect
Ethereal,
/// Magnetic(Male) voice effect
MaleMagnetic,
/// Fresh(Female) voice effect
FemaleFresh,
/// Electronic effects in C major voice effect
MajorC,
/// Electronic effects in A minor voice effect
MinorA,
/// Electronic effects in harmonic minor voice effect
HarmonicMinor,
/// Female Vitality Sound effect
FemaleEnergetic,
/// Richness effect
RichNess,
/// Muffled effect
Muffled,
/// Roundness effect
Roundness,
/// Falsetto effect
Falsetto,
/// Fullness effect
Fullness,
/// Clear effect
Clear,
/// Hight effect
HighlyResonant,
/// Loud clear effect
LoudClear,
/// Minions effect
Minions,
/// Sunshine effect, only support iOS
Sunshine,
/// Gentle effect, only support iOS
Gentle,
/// Sweet effect, only support iOS
Sweet,
/// Sweet male effect, only support iOS
SweetMale,
/// Sweet female effect, only support iOS
SweetFemale,
/// Bright effect, only support iOS
Bright,
/// Autobot effect
Autobot,
/// Out of power effect
OutOfPower
}
/// Reverberation preset value.
enum ZegoReverbPreset {
/// No Reverberation
None,
/// Soft room reverb effect
SoftRoom,
/// Large room reverb effect
LargeRoom,
/// Concert hall reverb effect
ConcertHall,
/// Valley reverb effect
Valley,
/// Recording studio reverb effect
RecordingStudio,
/// Basement reverb effect
Basement,
/// KTV reverb effect
KTV,
/// Popular reverb effect
Popular,
/// Rock reverb effect
Rock,
/// Vocal concert reverb effect
VocalConcert,
/// Gramophone reverb effect
GramoPhone,
/// Enhanced KTV reverb effect. Provide KTV effect with more concentrated voice and better brightness. Compared with the original KTV reverb effect, the reverberation time is shortened and the dry-wet ratio is increased.
EnhancedKTV,
/// Enhanced Rock reverb effect
EnhancedRock,
/// Enhanced misty reverb effect
EnhancedMisty
}
/// Mode of Electronic Effects.
enum ZegoElectronicEffectsMode {
/// Major
Major,
/// Minor
Minor,
/// Harmonic Minor
HarmonicMinor
}
/// Video configuration resolution and bitrate preset enumeration. The preset resolutions are adapted for mobile and desktop. On mobile, height is longer than width, and desktop is the opposite. For example, 1080p is actually 1080(w) x 1920(h) on mobile and 1920(w) x 1080(h) on desktop.
enum ZegoVideoConfigPreset {
/// Set the resolution to 320x180, the default is 15 fps, the code rate is 300 kbps
Preset180P,
/// Set the resolution to 480x270, the default is 15 fps, the code rate is 400 kbps
Preset270P,
/// Set the resolution to 640x360, the default is 15 fps, the code rate is 600 kbps
Preset360P,
/// Set the resolution to 960x540, the default is 15 fps, the code rate is 1200 kbps
Preset540P,
/// Set the resolution to 1280x720, the default is 15 fps, the code rate is 1500 kbps
Preset720P,
/// Set the resolution to 1920x1080, the default is 15 fps, the code rate is 3000 kbps
Preset1080P
}
/// Stream quality level.
enum ZegoStreamQualityLevel {
/// Excellent
Excellent,
/// Good
Good,
/// Normal
Medium,
/// Bad
Bad,
/// Failed
Die,
/// Unknown
Unknown
}
/// Audio channel type.
enum ZegoAudioChannel {
/// Unknown
Unknown,
/// Mono
Mono,
/// Stereo
Stereo
}
/// Audio capture stereo mode.
enum ZegoAudioCaptureStereoMode {
/// Disable stereo capture, that is, mono.
None,
/// Always enable stereo capture.
Always,
/// [Deprecated] Same as [Always], that is, always enable stereo capture, this mode has been deprecated since version 2.16.0.
@Deprecated('Same as [Always], that is, always enable stereo capture')
Adaptive
}
/// Audio mix mode.
enum ZegoAudioMixMode {
/// Default mode, no special behavior
Raw,
/// Audio focus mode, which can highlight the sound of a certain stream in multiple audio streams
Focused
}
/// Audio codec ID.
enum ZegoAudioCodecID {
/// Default, determined by the [scenario] when calling [createEngine].
Default,
/// Can be used for RTC and CDN streaming; bitrate range from 10kbps to 128kbps; supports stereo; latency is around 500ms. Server cloud transcoding is required when communicating with the Web SDK, and it is not required when relaying to CDN.
Normal,
/// Can be used for RTC and CDN streaming; good compatibility; bitrate range from 16kbps to 192kbps; supports stereo; latency is around 350ms; the sound quality is worse than [Normal] in the same (low) bitrate. Server cloud transcoding is required when communicating with the Web SDK, and it is not required when relaying to CDN.
Normal2,
/// Not recommended; if you need to use it, please contact ZEGO technical support. Can only be used for RTC streaming.
Normal3,
/// Not recommended; if you need to use it, please contact ZEGO technical support. Can only be used for RTC streaming.
Low,
/// Not recommended; if you need to use it, please contact ZEGO technical support. Can only be used for RTC streaming; maximum bitrate is 16kbps.
Low2,
/// Can only be used for RTC streaming; bitrate range from 6kbps to 192kbps; supports stereo; latency is around 200ms; Under the same bitrate (low bitrate), the sound quality is significantly better than [Normal] and [Normal2]; low CPU overhead. Server cloud transcoding is not required when communicating with the Web SDK, and it is required when relaying to CDN.
Low3
}
/// Video codec ID.
enum ZegoVideoCodecID {
/// Default (H.264)
Default,
/// Scalable Video Coding (H.264 SVC)
Svc,
/// VP8
Vp8,
/// H.265
H265,
/// Dualstream Scalable Video Coding
H264DualStream,
/// Unknown Video Coding
Unknown
}
/// Backend implementation of video codec.
enum ZegoVideoCodecBackend {
/// Software or Hardware
Any,
/// Software
Software,
/// Hardware
Hardware
}
/// Video stream type
enum ZegoVideoStreamType {
/// The type to be played depends on the network status
Default,
/// small resolution type
Small,
/// big resolution type
Big
}
/// Audio echo cancellation mode.
enum ZegoAECMode {
/// Aggressive echo cancellation may affect the sound quality slightly, but the echo will be very clean.
Aggressive,
/// Moderate echo cancellation, which may slightly affect a little bit of sound, but the residual echo will be less.
Medium,
/// Comfortable echo cancellation, that is, echo cancellation does not affect the sound quality of the sound, and sometimes there may be a little echo, but it will not affect the normal listening.
Soft
}
/// Active Noise Suppression mode.
enum ZegoANSMode {
/// Soft ANS. In most instances, the sound quality will not be damaged, but some noise will remain.
Soft,
/// Medium ANS. It may damage some sound quality, but it has a good noise reduction effect.
Medium,
/// Aggressive ANS. It may significantly impair the sound quality, but it has a good noise reduction effect.
Aggressive,
/// AI mode ANS. It will cause great damage to music, so it can not be used for noise suppression of sound sources that need to collect background sound. Please contact ZEGO technical support before use.
AI,
/// Balanced AI mode ANS. It will cause great damage to music, so it can not be used for noise suppression of sound sources that need to collect background sound. Please contact ZEGO technical support before use.
AIBalanced,
/// Low latency AI mode ANS. It will cause great damage to music, so it can not be used for noise suppression of sound sources that need to collect background sound. Please contact ZEGO technical support before use.
AILowLatency
}
/// video encode profile.
enum ZegoEncodeProfile {
/// The default video encode specifications, The default value is the video encoding specification at the Main level.
Default,
/// Baseline-level video encode specifications have low decoding consumption and poor picture effects. They are generally used for low-level applications or applications that require additional fault tolerance.
Baseline,
/// Main-level video encode specifications, decoding consumption is slightly higher than Baseline, the picture effect is also better, generally used in mainstream consumer electronic products.
Main,
/// High-level video encode specifications, decoding consumption is higher than Main, the picture effect is better, generally used for broadcasting and video disc storage, high-definition TV.
High
}
/// Video rate control mode, the default mode is constant video rate.
enum ZegoVideoRateControlMode {
/// Constant rate.
ConstantRate,
/// Constant quality, if this mode is used, the video rate fluctuates according to the network speed. For example, in the live broadcast of games, the constant quality mode will be used to improve the video quality in order to let the audience see smooth operation pictures.
ConstantQuality
}
/// Stream alignment mode.
enum ZegoStreamAlignmentMode {
/// Disable stream alignment.
None,
/// Streams should be aligned as much as possible, call the [setStreamAlignmentProperty] function to enable the stream alignment of the push stream network time alignment of the specified channel.
Try
}
/// Mixed stream sets the image parameter check mode.
enum ZegoMixImageCheckMode {
/// Strictly perform image verification, set the background image, watermark will verify the image path, the image occupy set in the mixed flow input parameter will also verify whether the set image resource request is successful, in order to normally initiate mixed flow, otherwise fail to initiate mixed flow.
Normal,
/// Only verify image path URI/URL As long as the path is correct, the mixed flow is successfully initiated.
Path,
/// The mixed flow can be initiated successfully without checking the related parameters of the picture.
Nothing
}
/// Traffic control property (bitmask enumeration).
class ZegoTrafficControlProperty {
/// Basic (Adaptive (reduce) video bitrate)
static const int Basic = 0;
/// Adaptive (reduce) video FPS
static const int AdaptiveFPS = 1;
/// Adaptive (reduce) video resolution
static const int AdaptiveResolution = 2;
/// Adaptive (reduce) audio bitrate
static const int AdaptiveAudioBitrate = 4;
}
/// Video transmission mode when current bitrate is lower than the set minimum bitrate.
enum ZegoTrafficControlMinVideoBitrateMode {
/// Stop video transmission when current bitrate is lower than the set minimum bitrate
NoVideo,
/// Video is sent at a very low frequency (no more than 2fps) which is lower than the set minimum bitrate
UltraLowFPS
}
/// Factors that trigger traffic control
enum ZegoTrafficControlFocusOnMode {
/// Focus only on the local network
ZegoTrafficControlFounsOnLocalOnly,
/// Pay attention to the local network, but also take into account the remote network, currently only effective in the 1v1 scenario
ZegoTrafficControlFounsOnRemote
}
/// Playing stream status.
enum ZegoPlayerState {
/// The state of the flow is not played, and it is in this state before the stream is played. If the steady flow anomaly occurs during the playing process, such as AppID or Token are incorrect, it will enter this state.
NoPlay,
/// The state that the stream is being requested for playing. After the [startPlayingStream] function is successfully called, it will enter the state. The UI is usually displayed through this state. If the connection is interrupted due to poor network quality, the SDK will perform an internal retry and will return to the requesting state.
PlayRequesting,
/// The state that the stream is being playing, entering the state indicates that the stream has been successfully played, and the user can communicate normally.
Playing
}
/// Media event when playing.
enum ZegoPlayerMediaEvent {
/// Audio stuck event when playing
AudioBreakOccur,
/// Audio stuck event recovery when playing
AudioBreakResume,
/// Video stuck event when playing
VideoBreakOccur,
/// Video stuck event recovery when playing
VideoBreakResume
}
/// Resource Type.
enum ZegoResourceType {
/// CDN
CDN,
/// RTC
RTC,
/// L3
L3
}
/// Stream Resource Mode
enum ZegoStreamResourceMode {
/// Default mode. The SDK will automatically select the streaming resource according to the cdnConfig parameters set by the player config and the ready-made background configuration.
Default,
/// Playing stream only from CDN.
OnlyCDN,
/// Playing stream only from L3.
OnlyL3,
/// Playing stream only from RTC.
OnlyRTC,
/// [Deprecated] CDN Plus mode. The SDK will automatically select the streaming resource according to the network condition.
@Deprecated('Legacy CDN Plus')
CDNPlus
}
/// Stream Switch Resource Mode
enum ZegoStreamResourceSwitchMode {
/// Default mode. The SDK will automatically select the streaming resource according to the parameters set by the player config and the ready-made background configuration.
Default,
/// Auto switch to RTC resource when publishing.
SwitchToRTC,
/// Keep using original resource when publishing, not switch to RTC resource.
KeepOriginal
}
/// Stream Resource Type
enum ZegoStreamResourceType {
/// Default mode. The SDK will automatically select the streaming resource according to the parameters set by the player config and the ready-made background configuration.
Default,
/// CDN resource.
CDN,
/// L3 resource.
L3
}
/// Update type.
enum ZegoUpdateType {
/// Add
Add,
/// Delete
Delete
}
/// Get room stream list type.
enum ZegoRoomStreamListType {
/// List of all online streams in the current room, excluding your own streams
Play,
/// List of all online streams in the current room, including your own streams
All
}
/// Capability negotiation enable bitmask enumeration.
class ZegoRoomCapabilityNegotiationTypesBitMask {
/// The mask bit of this field corresponds to enable the capability negotiation of all user in the room.
static const int All = 1 << 0;
/// The mask bit of this field corresponds to enable the capability negotiation of publisher in the room.
static const int ZegoRoomCapabilityNegotiationTypesPublisher = 1 << 1;
}
/// State of CDN relay.
enum ZegoStreamRelayCDNState {
/// The state indicates that there is no CDN relay
NoRelay,
/// The CDN relay is being requested
RelayRequesting,
/// Entering this status indicates that the CDN relay has been successful
Relaying
}
/// Reason for state of CDN relay changed.
enum ZegoStreamRelayCDNUpdateReason {
/// No error
None,
/// Server error
ServerError,
/// Handshake error
HandshakeFailed,
/// Access point error
AccessPointError,
/// Stream create failure
CreateStreamFailed,
/// Bad stream ID
BadName,
/// CDN server actively disconnected
CDNServerDisconnected,
/// Active disconnect
Disconnected,
/// All mixer input streams sessions closed
MixStreamAllInputStreamClosed,
/// All mixer input streams have no data
MixStreamAllInputStreamNoData,
/// Internal error of stream mixer server
MixStreamServerInternalError
}
/// Beauty feature (bitmask enumeration).
class ZegoBeautifyFeature {
/// No beautifying
static const int None = 0;
/// Polish
static const int Polish = 1 << 0;
/// Sharpen
static const int Whiten = 1 << 1;
/// Skin whiten
static const int SkinWhiten = 1 << 2;
/// Whiten
static const int Sharpen = 1 << 3;
}
/// Device type.
enum ZegoDeviceType {
/// Unknown device type.
Unknown,
/// Camera device.
Camera,
/// Microphone device.
Microphone,
/// Speaker device.
Speaker,
/// Audio device. (Other audio device that cannot be accurately classified into microphones or speakers.)
AudioDevice,
/// Audio Session.
AudioSession
}
/// The exception type for the device.
enum ZegoDeviceExceptionType {
/// Unknown device exception.
Unknown,
/// Generic device exception.
Generic,
/// Invalid device ID exception.
InvalidId,
/// Device permission is not granted.
PermissionNotGranted,
/// The capture frame rate of the device is 0.
ZeroCaptureFps,
/// The device is being occupied.
DeviceOccupied,
/// The device is unplugged (not plugged in).
DeviceUnplugged,
/// The device requires the system to restart before it can work (Windows platform only).
RebootRequired,
/// The system media service is unavailable, e.g. when the iOS system detects that the current pressure is huge (such as playing a lot of animation), it is possible to disable all media related services (Apple platform only).
MediaServicesWereLost,
/// The device is being occupied by Siri (Apple platform only).
SiriIsRecording,
/// The device captured sound level is too low (Windows platform only).
SoundLevelTooLow,
/// The device is being occupied, and maybe cause by iPad magnetic case (Apple platform only).
MagneticCase,
/// Audio session deactive (Apple platform only).
AudioSessionDeactive,
/// Audio session category change (Apple platform only).
AudioSessionCategoryChange
}
/// Remote device status.
enum ZegoRemoteDeviceState {
/// Device on