Source: ZegoExpressDefines.js

  1. /**
  2. * Application scenario.
  3. * @enum {number}
  4. */
  5. const ZegoScenario =
  6. {
  7. /**
  8. * @description General scenario
  9. */
  10. General: 0,
  11. /**
  12. * @description Communication scenario
  13. */
  14. Communication: 1,
  15. /**
  16. * @description Live scenario
  17. */
  18. Live: 2,
  19. }
  20. /**
  21. * Language.
  22. * @enum {number}
  23. */
  24. const ZegoLanguage =
  25. {
  26. /**
  27. * @description English
  28. */
  29. English: 0,
  30. /**
  31. * @description Chinese
  32. */
  33. Chinese: 1,
  34. }
  35. /**
  36. * engine state.
  37. * @enum {number}
  38. */
  39. const ZegoEngineState =
  40. {
  41. /**
  42. * @description The engine has started
  43. */
  44. Start: 0,
  45. /**
  46. * @description The engine has stoped
  47. */
  48. Stop: 1,
  49. }
  50. /**
  51. * Room state.
  52. * @enum {number}
  53. */
  54. const ZegoRoomState =
  55. {
  56. /**
  57. * @description 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 and AppSign are incorrect, or if the same user name is logged in elsewhere and the local end is KickOut, it will enter this state.
  58. */
  59. Disconnected: 0,
  60. /**
  61. * @description 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.
  62. */
  63. Connecting: 1,
  64. /**
  65. * @description 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.
  66. */
  67. Connected: 2,
  68. }
  69. /**
  70. * Publish channel.
  71. * @enum {number}
  72. */
  73. const ZegoPublishChannel =
  74. {
  75. /**
  76. * @description Main publish channel, default publish channel.
  77. */
  78. Main: 0,
  79. /**
  80. * @description Auxiliary publish channel
  81. */
  82. Aux: 1,
  83. /**
  84. * @description The third publish channel
  85. */
  86. Third: 2,
  87. /**
  88. * @description The fourth publish channel
  89. */
  90. Fourth: 3,
  91. }
  92. /**
  93. * Video rendering fill mode.
  94. * @enum {number}
  95. */
  96. const ZegoViewMode =
  97. {
  98. /**
  99. * @description The proportional scaling up, there may be black borders
  100. */
  101. AspectFit: 0,
  102. /**
  103. * @description The proportional zoom fills the entire View and may be partially cut
  104. */
  105. AspectFill: 1,
  106. /**
  107. * @description Fill the entire view, the image may be stretched
  108. */
  109. ScaleToFill: 2,
  110. }
  111. /**
  112. * Mirror mode for previewing or playing the of the stream.
  113. * @enum {number}
  114. */
  115. const ZegoVideoMirrorMode =
  116. {
  117. /**
  118. * @description The mirror image only for previewing locally. This mode is used by default.
  119. */
  120. OnlyPreviewMirror: 0,
  121. /**
  122. * @description Both the video previewed locally and the far end playing the stream will see mirror image.
  123. */
  124. BothMirror: 1,
  125. /**
  126. * @description Both the video previewed locally and the far end playing the stream will not see mirror image.
  127. */
  128. NoMirror: 2,
  129. /**
  130. * @description The mirror image only for far end playing the stream.
  131. */
  132. OnlyPublishMirror: 3,
  133. }
  134. /**
  135. * SEI type
  136. * @enum {number}
  137. */
  138. const ZegoSEIType =
  139. {
  140. /**
  141. * @description 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.
  142. */
  143. ZegoDefined: 0,
  144. /**
  145. * @description 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.
  146. */
  147. UserUnregister: 1,
  148. }
  149. /**
  150. * Publish stream status.
  151. * @enum {number}
  152. */
  153. const ZegoPublisherState =
  154. {
  155. /**
  156. * @description 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 and AppSign are incorrect, or if other users are already publishing the stream, there will be a failure and enter this state.
  157. */
  158. NoPublish: 0,
  159. /**
  160. * @description 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.
  161. */
  162. PublishRequesting: 1,
  163. /**
  164. * @description 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.
  165. */
  166. Publishing: 2,
  167. }
  168. /**
  169. * Voice changer preset value.
  170. * @enum {number}
  171. */
  172. const ZegoVoiceChangerPreset =
  173. {
  174. /**
  175. * @description No Voice changer
  176. */
  177. None: 0,
  178. /**
  179. * @description Male to child voice (loli voice effect)
  180. */
  181. MenToChild: 1,
  182. /**
  183. * @description Male to female voice (kindergarten voice effect)
  184. */
  185. MenToWomen: 2,
  186. /**
  187. * @description Female to child voice
  188. */
  189. WomenToChild: 3,
  190. /**
  191. * @description Female to male voice
  192. */
  193. WomenToMen: 4,
  194. /**
  195. * @description Foreigner voice effect
  196. */
  197. Foreigner: 5,
  198. /**
  199. * @description Autobot Optimus Prime voice effect
  200. */
  201. OptimusPrime: 6,
  202. /**
  203. * @description Android robot voice effect
  204. */
  205. Android: 7,
  206. /**
  207. * @description Ethereal voice effect
  208. */
  209. Ethereal: 8,
  210. /**
  211. * @description Magnetic(Male) voice effect
  212. */
  213. MaleMagnetic: 9,
  214. /**
  215. * @description Fresh(Female) voice effect
  216. */
  217. FemaleFresh: 10,
  218. /**
  219. * @description Electronic effects in C major voice effect
  220. */
  221. MajorC: 11,
  222. /**
  223. * @description Electronic effects in A minor voice effect
  224. */
  225. MinorA: 12,
  226. /**
  227. * @description Electronic effects in harmonic minor voice effect
  228. */
  229. HarmonicMinor: 13,
  230. }
  231. /**
  232. * Reverberation preset value.
  233. * @enum {number}
  234. */
  235. const ZegoReverbPreset =
  236. {
  237. /**
  238. * @description No Reverberation
  239. */
  240. None: 0,
  241. /**
  242. * @description Soft room reverb effect
  243. */
  244. SoftRoom: 1,
  245. /**
  246. * @description Large room reverb effect
  247. */
  248. LargeRoom: 2,
  249. /**
  250. * @description Concert hall reverb effect
  251. */
  252. ConcertHall: 3,
  253. /**
  254. * @description Valley reverb effect
  255. */
  256. Valley: 4,
  257. /**
  258. * @description Recording studio reverb effect
  259. */
  260. RecordingStudio: 5,
  261. /**
  262. * @description Basement reverb effect
  263. */
  264. Basement: 6,
  265. /**
  266. * @description KTV reverb effect
  267. */
  268. KTV: 7,
  269. /**
  270. * @description Popular reverb effect
  271. */
  272. Popular: 8,
  273. /**
  274. * @description Rock reverb effect
  275. */
  276. Rock: 9,
  277. /**
  278. * @description Vocal concert reverb effect
  279. */
  280. VocalConcert: 10,
  281. /**
  282. * @description Gramophone reverb effect
  283. */
  284. GramoPhone: 11,
  285. }
  286. /**
  287. * 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.
  288. * @enum {number}
  289. */
  290. const ZegoVideoConfigPreset =
  291. {
  292. /**
  293. * @description Set the resolution to 320x180, the default is 15 fps, the code rate is 300 kbps
  294. */
  295. Preset180P: 0,
  296. /**
  297. * @description Set the resolution to 480x270, the default is 15 fps, the code rate is 400 kbps
  298. */
  299. Preset270P: 1,
  300. /**
  301. * @description Set the resolution to 640x360, the default is 15 fps, the code rate is 600 kbps
  302. */
  303. Preset360P: 2,
  304. /**
  305. * @description Set the resolution to 960x540, the default is 15 fps, the code rate is 1200 kbps
  306. */
  307. Preset540P: 3,
  308. /**
  309. * @description Set the resolution to 1280x720, the default is 15 fps, the code rate is 1500 kbps
  310. */
  311. Preset720P: 4,
  312. /**
  313. * @description Set the resolution to 1920x1080, the default is 15 fps, the code rate is 3000 kbps
  314. */
  315. Preset1080P: 5,
  316. }
  317. /**
  318. * Stream quality level.
  319. * @enum {number}
  320. */
  321. const ZegoStreamQualityLevel =
  322. {
  323. /**
  324. * @description Excellent
  325. */
  326. Excellent: 0,
  327. /**
  328. * @description Good
  329. */
  330. Good: 1,
  331. /**
  332. * @description Normal
  333. */
  334. Medium: 2,
  335. /**
  336. * @description Bad
  337. */
  338. Bad: 3,
  339. /**
  340. * @description Failed
  341. */
  342. Die: 4,
  343. /**
  344. * @description Unknown
  345. */
  346. Unknown: 5,
  347. }
  348. /**
  349. * Audio channel type.
  350. * @enum {number}
  351. */
  352. const ZegoAudioChannel =
  353. {
  354. /**
  355. * @description Unknown
  356. */
  357. Unknown: 0,
  358. /**
  359. * @description Mono
  360. */
  361. Mono: 1,
  362. /**
  363. * @description Stereo
  364. */
  365. Stereo: 2,
  366. }
  367. /**
  368. * Audio capture stereo mode.
  369. * @enum {number}
  370. */
  371. const ZegoAudioCaptureStereoMode =
  372. {
  373. /**
  374. * @description Disable capture stereo, i.e. capture mono
  375. */
  376. None: 0,
  377. /**
  378. * @description Always enable capture stereo
  379. */
  380. Always: 1,
  381. /**
  382. * @description Adaptive mode, capture stereo when publishing stream only, capture mono when publishing and playing stream (e.g. talk/intercom scenes)
  383. */
  384. Adaptive: 2,
  385. }
  386. /**
  387. * Audio Codec ID.
  388. * @enum {number}
  389. */
  390. const ZegoAudioCodecID =
  391. {
  392. /**
  393. * @description default
  394. */
  395. Default: 0,
  396. /**
  397. * @description Normal
  398. */
  399. Normal: 1,
  400. /**
  401. * @description Normal2
  402. */
  403. Normal2: 2,
  404. /**
  405. * @description Normal3
  406. */
  407. Normal3: 3,
  408. /**
  409. * @description Low
  410. */
  411. Low: 4,
  412. /**
  413. * @description Low2
  414. */
  415. Low2: 5,
  416. /**
  417. * @description Low3
  418. */
  419. Low3: 6,
  420. }
  421. /**
  422. * Video codec ID.
  423. * @enum {number}
  424. */
  425. const ZegoVideoCodecID =
  426. {
  427. /**
  428. * @description Default (H.264)
  429. */
  430. Default: 0,
  431. /**
  432. * @description Scalable Video Coding (H.264 SVC)
  433. */
  434. SVC: 1,
  435. /**
  436. * @description VP8
  437. */
  438. VP8: 2,
  439. /**
  440. * @description H.265
  441. */
  442. H265: 3,
  443. }
  444. /**
  445. * Player video layer.
  446. * @enum {number}
  447. */
  448. const ZegoPlayerVideoLayer =
  449. {
  450. /**
  451. * @description The layer to be played depends on the network status
  452. */
  453. Auto: 0,
  454. /**
  455. * @description Play the base layer (small resolution)
  456. */
  457. Base: 1,
  458. /**
  459. * @description Play the extend layer (big resolution)
  460. */
  461. BaseExtend: 2,
  462. }
  463. /**
  464. * Video stream type
  465. * @enum {number}
  466. */
  467. const ZegoVideoStreamType =
  468. {
  469. /**
  470. * @description The type to be played depends on the network status
  471. */
  472. Default: 0,
  473. /**
  474. * @description small resolution type
  475. */
  476. Small: 1,
  477. /**
  478. * @description big resolution type
  479. */
  480. Big: 2,
  481. }
  482. /**
  483. * Audio echo cancellation mode.
  484. * @enum {number}
  485. */
  486. const ZegoAECMode =
  487. {
  488. /**
  489. * @description Aggressive echo cancellation may affect the sound quality slightly, but the echo will be very clean.
  490. */
  491. Aggressive: 0,
  492. /**
  493. * @description Moderate echo cancellation, which may slightly affect a little bit of sound, but the residual echo will be less.
  494. */
  495. Medium: 1,
  496. /**
  497. * @description 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.
  498. */
  499. Soft: 2,
  500. }
  501. /**
  502. * Active Noise Suppression mode.
  503. * @enum {number}
  504. */
  505. const ZegoANSMode =
  506. {
  507. /**
  508. * @description Soft ANS. In most instances, the sound quality will not be damaged, but some noise will remain.
  509. */
  510. Soft: 0,
  511. /**
  512. * @description Medium ANS. It may damage some sound quality, but it has a good noise reduction effect.
  513. */
  514. Medium: 1,
  515. /**
  516. * @description Aggressive ANS. It may significantly impair the sound quality, but it has a good noise reduction effect.
  517. */
  518. Aggressive: 2,
  519. }
  520. /**
  521. * Traffic control property (bitmask enumeration).
  522. * @enum {number}
  523. */
  524. const ZegoTrafficControlProperty =
  525. {
  526. /**
  527. * @description Basic (Adaptive (reduce) video bitrate)
  528. */
  529. Basic: 0,
  530. /**
  531. * @description Adaptive (reduce) video FPS
  532. */
  533. AdaptiveFPS: 1,
  534. /**
  535. * @description Adaptive (reduce) video resolution
  536. */
  537. AdaptiveResolution: 1 << 1,
  538. /**
  539. * @description Adaptive (reduce) audio bitrate
  540. */
  541. AdaptiveAudioBitrate: 1 << 2,
  542. }
  543. /**
  544. * Video transmission mode when current bitrate is lower than the set minimum bitrate.
  545. * @enum {number}
  546. */
  547. const ZegoTrafficControlMinVideoBitrateMode =
  548. {
  549. /**
  550. * @description Stop video transmission when current bitrate is lower than the set minimum bitrate
  551. */
  552. NoVideo: 0,
  553. /**
  554. * @description Video is sent at a very low frequency (no more than 2fps) which is lower than the set minimum bitrate
  555. */
  556. UltraLowFPS: 1,
  557. }
  558. /**
  559. * Factors that trigger traffic control
  560. * @enum {number}
  561. */
  562. const ZegoTrafficControlFocusOnMode =
  563. {
  564. /**
  565. * @description Focus only on the local network
  566. */
  567. ZegoTrafficControlFounsOnLocalOnly: 0,
  568. /**
  569. * @description Pay attention to the local network, but also take into account the remote network, currently only effective in the 1v1 scenario
  570. */
  571. ZegoTrafficControlFounsOnRemote: 1,
  572. }
  573. /**
  574. * Playing stream status.
  575. * @enum {number}
  576. */
  577. const ZegoPlayerState =
  578. {
  579. /**
  580. * @description 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 and AppSign are incorrect, it will enter this state.
  581. */
  582. NoPlay: 0,
  583. /**
  584. * @description 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.
  585. */
  586. PlayRequesting: 1,
  587. /**
  588. * @description 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.
  589. */
  590. Playing: 2,
  591. }
  592. /**
  593. * Media event when playing.
  594. * @enum {number}
  595. */
  596. const ZegoPlayerMediaEvent =
  597. {
  598. /**
  599. * @description Audio stuck event when playing
  600. */
  601. AudioBreakOccur: 0,
  602. /**
  603. * @description Audio stuck event recovery when playing
  604. */
  605. AudioBreakResume: 1,
  606. /**
  607. * @description Video stuck event when playing
  608. */
  609. VideoBreakOccur: 2,
  610. /**
  611. * @description Video stuck event recovery when playing
  612. */
  613. VideoBreakResume: 3,
  614. }
  615. /**
  616. * Stream Resource Mode
  617. * @enum {number}
  618. */
  619. const ZegoStreamResourceMode =
  620. {
  621. /**
  622. * @description 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.
  623. */
  624. Default: 0,
  625. /**
  626. * @description Playing stream only from CDN.
  627. */
  628. OnlyCDN: 1,
  629. /**
  630. * @description Playing stream only from L3.
  631. */
  632. OnlyL3: 2,
  633. /**
  634. * @description Playing stream only from RTC.
  635. */
  636. OnlyRTC: 3,
  637. }
  638. /**
  639. * Update type.
  640. * @enum {number}
  641. */
  642. const ZegoUpdateType =
  643. {
  644. /**
  645. * @description Add
  646. */
  647. Add: 0,
  648. /**
  649. * @description Delete
  650. */
  651. Delete: 1,
  652. }
  653. /**
  654. * State of CDN relay.
  655. * @enum {number}
  656. */
  657. const ZegoStreamRelayCDNState =
  658. {
  659. /**
  660. * @description The state indicates that there is no CDN relay
  661. */
  662. NoRelay: 0,
  663. /**
  664. * @description The CDN relay is being requested
  665. */
  666. RelayRequesting: 1,
  667. /**
  668. * @description Entering this status indicates that the CDN relay has been successful
  669. */
  670. Relaying: 2,
  671. }
  672. /**
  673. * Reason for state of CDN relay changed.
  674. * @enum {number}
  675. */
  676. const ZegoStreamRelayCDNUpdateReason =
  677. {
  678. /**
  679. * @description No error
  680. */
  681. None: 0,
  682. /**
  683. * @description Server error
  684. */
  685. ServerError: 1,
  686. /**
  687. * @description Handshake error
  688. */
  689. HandshakeFailed: 2,
  690. /**
  691. * @description Access point error
  692. */
  693. AccessPointError: 3,
  694. /**
  695. * @description Stream create failure
  696. */
  697. CreateStreamFailed: 4,
  698. /**
  699. * @description Bad name
  700. */
  701. BadName: 5,
  702. /**
  703. * @description CDN server actively disconnected
  704. */
  705. CDNServerDisconnected: 6,
  706. /**
  707. * @description Active disconnect
  708. */
  709. Disconnected: 7,
  710. /**
  711. * @description All mixer input streams sessions closed
  712. */
  713. MixStreamAllInputStreamClosed: 8,
  714. /**
  715. * @description All mixer input streams have no data
  716. */
  717. MixStreamAllInputStreamNoData: 9,
  718. /**
  719. * @description Internal error of stream mixer server
  720. */
  721. MixStreamServerInternalError: 10,
  722. }
  723. /**
  724. * Remote device status.
  725. * @enum {number}
  726. */
  727. const ZegoRemoteDeviceState =
  728. {
  729. /**
  730. * @description Device on
  731. */
  732. Open: 0,
  733. /**
  734. * @description General device error
  735. */
  736. GenericError: 1,
  737. /**
  738. * @description Invalid device ID
  739. */
  740. InvalidID: 2,
  741. /**
  742. * @description No permission
  743. */
  744. NoAuthorization: 3,
  745. /**
  746. * @description Captured frame rate is 0
  747. */
  748. ZeroFPS: 4,
  749. /**
  750. * @description The device is occupied
  751. */
  752. InUseByOther: 5,
  753. /**
  754. * @description The device is not plugged in or unplugged
  755. */
  756. Unplugged: 6,
  757. /**
  758. * @description The system needs to be restarted
  759. */
  760. RebootRequired: 7,
  761. /**
  762. * @description System media services stop, such as under the iOS platform, when the system detects that the current pressure is huge (such as playing a lot of animation), it is possible to disable all media related services.
  763. */
  764. SystemMediaServicesLost: 8,
  765. /**
  766. * @description Capturing disabled
  767. */
  768. Disable: 9,
  769. /**
  770. * @description The remote device is muted
  771. */
  772. Mute: 10,
  773. /**
  774. * @description The device is interrupted, such as a phone call interruption, etc.
  775. */
  776. Interruption: 11,
  777. /**
  778. * @description There are multiple apps at the same time in the foreground, such as the iPad app split screen, the system will prohibit all apps from using the camera.
  779. */
  780. InBackground: 12,
  781. /**
  782. * @description CDN server actively disconnected
  783. */
  784. MultiForegroundApp: 13,
  785. /**
  786. * @description The system is under high load pressure and may cause abnormal equipment.
  787. */
  788. BySystemPressure: 14,
  789. /**
  790. * @description The remote device is not supported to publish the device state.
  791. */
  792. NotSupport: 15,
  793. }
  794. /**
  795. * Audio device type.
  796. * @enum {number}
  797. */
  798. const ZegoAudioDeviceType =
  799. {
  800. /**
  801. * @description Audio input type
  802. */
  803. Input: 0,
  804. /**
  805. * @description Audio output type
  806. */
  807. Output: 1,
  808. }
  809. /**
  810. * Audio route
  811. * @enum {number}
  812. */
  813. const ZegoAudioRoute =
  814. {
  815. /**
  816. * @description Speaker
  817. */
  818. Speaker: 0,
  819. /**
  820. * @description Headphone
  821. */
  822. Headphone: 1,
  823. /**
  824. * @description Bluetooth device
  825. */
  826. Bluetooth: 2,
  827. /**
  828. * @description Receiver
  829. */
  830. Receiver: 3,
  831. /**
  832. * @description External USB audio device
  833. */
  834. ExternalUSB: 4,
  835. /**
  836. * @description Apple AirPlay
  837. */
  838. AirPlay: 5,
  839. }
  840. /**
  841. * Mix stream content type.
  842. * @enum {number}
  843. */
  844. const ZegoMixerInputContentType =
  845. {
  846. /**
  847. * @description Mix stream for audio only
  848. */
  849. Audio: 0,
  850. /**
  851. * @description Mix stream for both audio and video
  852. */
  853. Video: 1,
  854. /**
  855. * @description Mix stream for video only
  856. */
  857. VideoOnly: 2,
  858. }
  859. /**
  860. * Capture pipeline scale mode.
  861. * @enum {number}
  862. */
  863. const ZegoCapturePipelineScaleMode =
  864. {
  865. /**
  866. * @description Zoom immediately after acquisition, default
  867. */
  868. Pre: 0,
  869. /**
  870. * @description Scaling while encoding
  871. */
  872. Post: 1,
  873. }
  874. /**
  875. * Video frame format.
  876. * @enum {number}
  877. */
  878. const ZegoVideoFrameFormat =
  879. {
  880. /**
  881. * @description Unknown format, will take platform default
  882. */
  883. Unknown: 0,
  884. /**
  885. * @description I420 (YUV420Planar) format
  886. */
  887. I420: 1,
  888. /**
  889. * @description NV12 (YUV420SemiPlanar) format
  890. */
  891. NV12: 2,
  892. /**
  893. * @description NV21 (YUV420SemiPlanar) format
  894. */
  895. NV21: 3,
  896. /**
  897. * @description BGRA32 format
  898. */
  899. BGRA32: 4,
  900. /**
  901. * @description RGBA32 format
  902. */
  903. RGBA32: 5,
  904. /**
  905. * @description ARGB32 format
  906. */
  907. ARGB32: 6,
  908. /**
  909. * @description ABGR32 format
  910. */
  911. ABGR32: 7,
  912. /**
  913. * @description I422 (YUV422Planar) format
  914. */
  915. I422: 8,
  916. }
  917. /**
  918. * Video frame buffer type.
  919. * @enum {number}
  920. */
  921. const ZegoVideoBufferType =
  922. {
  923. /**
  924. * @description Raw data type video frame
  925. */
  926. Unknown: 0,
  927. /**
  928. * @description Raw data type video frame
  929. */
  930. RawData: 1,
  931. /**
  932. * @description Encoded data type video frame
  933. */
  934. EncodedData: 2,
  935. /**
  936. * @description Texture 2D type video frame
  937. */
  938. GLTexture2D: 3,
  939. /**
  940. * @description CVPixelBuffer type video frame
  941. */
  942. CVPixelBuffer: 4,
  943. /**
  944. * @description Surface Texture type video frame
  945. */
  946. SurfaceTexture: 5,
  947. /**
  948. * @description GL_TEXTURE_EXTERNAL_OES type video frame
  949. */
  950. GLTextureExternalOES: 6,
  951. }
  952. /**
  953. * Video frame format series.
  954. * @enum {number}
  955. */
  956. const ZegoVideoFrameFormatSeries =
  957. {
  958. /**
  959. * @description RGB series
  960. */
  961. RGB: 0,
  962. /**
  963. * @description YUV series
  964. */
  965. YUV: 1,
  966. }
  967. /**
  968. * Video frame flip mode.
  969. * @enum {number}
  970. */
  971. const ZegoVideoFlipMode =
  972. {
  973. /**
  974. * @description No flip
  975. */
  976. None: 0,
  977. /**
  978. * @description X-axis flip
  979. */
  980. X: 1,
  981. /**
  982. * @description Y-axis flip
  983. */
  984. Y: 2,
  985. /**
  986. * @description X-Y-axis flip
  987. */
  988. XY: 3,
  989. }
  990. /**
  991. * Audio Config Preset.
  992. * @enum {number}
  993. */
  994. const ZegoAudioConfigPreset =
  995. {
  996. /**
  997. * @description Basic sound quality (16 kbps, Mono, ZegoAudioCodecIDDefault)
  998. */
  999. BasicQuality: 0,
  1000. /**
  1001. * @description Standard sound quality (48 kbps, Mono, ZegoAudioCodecIDDefault)
  1002. */
  1003. StandardQuality: 1,
  1004. /**
  1005. * @description Standard sound quality (56 kbps, Stereo, ZegoAudioCodecIDDefault)
  1006. */
  1007. StandardQualityStereo: 2,
  1008. /**
  1009. * @description High sound quality (128 kbps, Mono, ZegoAudioCodecIDDefault)
  1010. */
  1011. HighQuality: 3,
  1012. /**
  1013. * @description High sound quality (192 kbps, Stereo, ZegoAudioCodecIDDefault)
  1014. */
  1015. HighQualityStereo: 4,
  1016. }
  1017. /**
  1018. * Player state.
  1019. * @enum {number}
  1020. */
  1021. const ZegoMediaPlayerState =
  1022. {
  1023. /**
  1024. * @description Not playing
  1025. */
  1026. NoPlay: 0,
  1027. /**
  1028. * @description Playing
  1029. */
  1030. Playing: 1,
  1031. /**
  1032. * @description Pausing
  1033. */
  1034. Pausing: 2,
  1035. /**
  1036. * @description End of play
  1037. */
  1038. PlayEnded: 3,
  1039. }
  1040. /**
  1041. * Player network event.
  1042. * @enum {number}
  1043. */
  1044. const ZegoMediaPlayerNetworkEvent =
  1045. {
  1046. /**
  1047. * @description Network resources are not playing well, and start trying to cache data
  1048. */
  1049. BufferBegin: 0,
  1050. /**
  1051. * @description Network resources can be played smoothly
  1052. */
  1053. BufferEnded: 1,
  1054. }
  1055. /**
  1056. * Audio channel.
  1057. * @enum {number}
  1058. */
  1059. const ZegoMediaPlayerAudioChannel =
  1060. {
  1061. /**
  1062. * @description Audio channel left
  1063. */
  1064. Left: 0,
  1065. /**
  1066. * @description Audio channel right
  1067. */
  1068. Right: 1,
  1069. /**
  1070. * @description Audio channel all
  1071. */
  1072. All: 2,
  1073. }
  1074. /**
  1075. * AudioEffectPlayer state.
  1076. * @enum {number}
  1077. */
  1078. const ZegoAudioEffectPlayState =
  1079. {
  1080. /**
  1081. * @description Not playing
  1082. */
  1083. NoPlay: 0,
  1084. /**
  1085. * @description Playing
  1086. */
  1087. Playing: 1,
  1088. /**
  1089. * @description Pausing
  1090. */
  1091. Pausing: 2,
  1092. /**
  1093. * @description End of play
  1094. */
  1095. PlayEnded: 3,
  1096. }
  1097. /**
  1098. * Record type.
  1099. * @enum {number}
  1100. */
  1101. const ZegoDataRecordType =
  1102. {
  1103. /**
  1104. * @description This field indicates that the Express-Audio SDK records audio by default, and the Express-Video SDK records audio and video by default. When recording files in .aac format, audio is also recorded by default.
  1105. */
  1106. Default: 0,
  1107. /**
  1108. * @description only record audio
  1109. */
  1110. OnlyAudio: 1,
  1111. /**
  1112. * @description only record video, Audio SDK and recording .aac format files are invalid.
  1113. */
  1114. OnlyVideo: 2,
  1115. /**
  1116. * @description record audio and video. Express-Audio SDK and .aac format files are recorded only audio.
  1117. */
  1118. AudioAndVideo: 3,
  1119. }
  1120. /**
  1121. * Record state.
  1122. * @enum {number}
  1123. */
  1124. const ZegoDataRecordState =
  1125. {
  1126. /**
  1127. * @description Unrecorded state, which is the state when a recording error occurs or before recording starts.
  1128. */
  1129. NoRecord: 0,
  1130. /**
  1131. * @description Recording in progress, in this state after successfully call [startRecordingCapturedData] function
  1132. */
  1133. Recording: 1,
  1134. /**
  1135. * @description Record successs
  1136. */
  1137. Success: 2,
  1138. }
  1139. /**
  1140. * Network mode
  1141. * @enum {number}
  1142. */
  1143. const ZegoNetworkMode =
  1144. {
  1145. /**
  1146. * @description Offline (No network)
  1147. */
  1148. Offline: 0,
  1149. /**
  1150. * @description Unknown network mode
  1151. */
  1152. Unknown: 1,
  1153. /**
  1154. * @description Wired Ethernet (LAN)
  1155. */
  1156. Ethernet: 2,
  1157. /**
  1158. * @description Wi-Fi (WLAN)
  1159. */
  1160. Wifi: 3,
  1161. /**
  1162. * @description 2G Network (GPRS/EDGE/CDMA1x/etc.)
  1163. */
  1164. Mode2G: 4,
  1165. /**
  1166. * @description 3G Network (WCDMA/HSDPA/EVDO/etc.)
  1167. */
  1168. Mode3G: 5,
  1169. /**
  1170. * @description 4G Network (LTE)
  1171. */
  1172. Mode4G: 6,
  1173. /**
  1174. * @description 5G Network (NR (NSA/SA))
  1175. */
  1176. Mode5G: 7,
  1177. }
  1178. /**
  1179. * network speed test type
  1180. * @enum {number}
  1181. */
  1182. const ZegoNetworkSpeedTestType =
  1183. {
  1184. /**
  1185. * @description uplink
  1186. */
  1187. Uplink: 0,
  1188. /**
  1189. * @description downlink
  1190. */
  1191. Downlink: 1,
  1192. }
  1193. /**
  1194. * @typedef {Object} ZegoLogConfig - Log config.
  1195. * @property {string} logPath - Log file save path
  1196. * @property {number} logSize - The maximum log file size (Bytes). The default maximum size is 5MB (5 * 1024 * 1024 Bytes)
  1197. */
  1198. /**
  1199. * @typedef {Object} ZegoEngineProfile - Profile for create engine
  1200. * @property {number} appID - Application ID issued by ZEGO for developers, please apply from the ZEGO Admin Console https://console-express.zego.im The value ranges from 0 to 4294967295.
  1201. * @property {string} appSign - Application signature for each AppID, please apply from the ZEGO Admin Console. Application signature is a 64 character string. Each character has a range of '0' ~ '9', 'a' ~ 'z'.
  1202. * @property {ZegoScenario} scenario - The application scenario. Developers can choose one of ZegoScenario based on the scenario of the app they are developing, and the engine will preset a more general setting for specific scenarios based on the set scenario. After setting specific scenarios, developers can still call specific functions to set specific parameters if they have customized parameter settings.
  1203. */
  1204. /**
  1205. * @typedef {Object} ZegoEngineConfig - Advanced engine configuration.
  1206. * @property {ZegoLogConfig} logConfig - Log configuration, if not set, use the default configuration. It must be set before calling [createEngine] to take effect. If it is set after [createEngine], it will take effect at the next [createEngine] after [destroyEngine].
  1207. * @property {map<string, string>} advancedConfig - Other special function switches, if not set, no special function will be used by default. Please contact ZEGO technical support before use.
  1208. */
  1209. /**
  1210. * @typedef {Object} ZegoRoomConfig - Advanced room configuration.
  1211. * @property {number} maxMemberCount - The maximum number of users in the room, Passing 0 means unlimited, the default is unlimited.
  1212. * @property {boolean} isUserStatusNotify - Whether to enable the user in and out of the room callback notification [onRoomUserUpdate], the default is off. If developers need to use ZEGO Room user notifications, make sure that each user who login sets this flag to true
  1213. * @property {string} token - The token issued by the developer's business server is used to ensure security. The generation rules are detailed in Room Login Authentication Description https://doc-en.zego.im/en/3881.html Default is empty string, that is, no authentication
  1214. */
  1215. /**
  1216. * @typedef {Object} ZegoVideoConfig - Video config.
  1217. * @property {number} captureWidth - Capture resolution width, control the width of camera image acquisition. SDK requires this member to be set to an even number. Only the camera is not started and the custom video capture is not used, the setting is effective. For performance reasons, the SDK scales the video frame to the encoding resolution after capturing from camera and before rendering to the preview view. Therefore, the resolution of the preview image is the encoding resolution. If you need the resolution of the preview image to be this value, Please call [setCapturePipelineScaleMode] first to change the capture pipeline scale mode to [Post]
  1218. * @property {number} captureHeight - Capture resolution height, control the height of camera image acquisition. SDK requires this member to be set to an even number. Only the camera is not started and the custom video capture is not used, the setting is effective. For performance reasons, the SDK scales the video frame to the encoding resolution after capturing from camera and before rendering to the preview view. Therefore, the resolution of the preview image is the encoding resolution. If you need the resolution of the preview image to be this value, Please call [setCapturePipelineScaleMode] first to change the capture pipeline scale mode to [Post]
  1219. * @property {number} encodeWidth - Encode resolution width, control the image width of the encoder when publishing stream. SDK requires this member to be set to an even number. The settings before and after publishing stream can be effective
  1220. * @property {number} encodeHeight - Encode resolution height, control the image height of the encoder when publishing stream. SDK requires this member to be set to an even number. The settings before and after publishing stream can be effective
  1221. * @property {number} fps - Frame rate, control the frame rate of the camera and the frame rate of the encoder. Only the camera is not started, the setting is effective
  1222. * @property {number} bitrate - Bit rate in kbps. The settings before and after publishing stream can be effective
  1223. * @property {ZegoVideoCodecID} codecID - The codec id to be used, the default value is [default]. Settings only take effect before publishing stream
  1224. */
  1225. /**
  1226. * @typedef {Object} ZegoSEIConfig - SEI configuration
  1227. * @property {ZegoSEIType} type - SEI type
  1228. */
  1229. /**
  1230. * @typedef {Object} ZegoVoiceChangerParam - Voice changer parameter.
  1231. * @property {number} pitch - Pitch parameter, value range [-8.0, 8.0], the larger the value, the sharper the sound, set it to 0.0 to turn off. Note that the voice changer effect is only valid for the captured sound.
  1232. */
  1233. /**
  1234. * @typedef {Object} ZegoReverbParam - Audio reverberation parameters.
  1235. * @property {number} roomSize - Room size, in the range [0.0, 1.0], to control the size of the "room" in which the reverb is generated, the larger the room, the stronger the reverb.
  1236. * @property {number} reverberance - Echo, in the range [0.0, 0.5], to control the trailing length of the reverb.
  1237. * @property {number} damping - Reverb Damping, range [0.0, 2.0], controls the attenuation of the reverb, the higher the damping, the higher the attenuation.
  1238. * @property {number} dryWetRatio - Dry/wet ratio, the range is greater than or equal to 0.0, to control the ratio between reverberation, direct sound and early reflections; dry part is set to 1 by default; the smaller the dry/wet ratio, the larger the wet ratio, the stronger the reverberation effect.
  1239. */
  1240. /**
  1241. * @typedef {Object} ZegoReverbAdvancedParam - Audio reverberation advanced parameters.
  1242. * @property {number} roomSize - Room size(%), in the range [0.0, 1.0], to control the size of the "room" in which the reverb is generated, the larger the room, the stronger the reverb.
  1243. * @property {number} reverberance - Echo(%), in the range [0.0, 100.0], to control the trailing length of the reverb.
  1244. * @property {number} damping - Reverb Damping(%), range [0.0, 100.0], controls the attenuation of the reverb, the higher the damping, the higher the attenuation.
  1245. * @property {boolean} wetOnly - only wet
  1246. * @property {number} wetGain - wet gain(dB), range [-20.0, 10.0]
  1247. * @property {number} dryGain - dry gain(dB), range [-20.0, 10.0]
  1248. * @property {number} toneLow - Tone Low. 100% by default
  1249. * @property {number} toneHigh - Tone High. 100% by default
  1250. * @property {number} preDelay - PreDelay(ms), range [0.0, 200.0]
  1251. * @property {number} stereoWidth - Stereo Width(%). 0% by default
  1252. */
  1253. /**
  1254. * @typedef {Object} ZegoReverbEchoParam - Audio reverberation echo parameters.
  1255. * @property {number} inGain - Gain of input audio signal, in the range [0.0, 1.0]
  1256. * @property {number} outGain - Gain of output audio signal, in the range [0.0, 1.0]
  1257. * @property {number} numDelays - Number of echos, in the range [0, 7]
  1258. * @property {number[]} delay - Respective delay of echo signal, in milliseconds, in the range [0, 5000] ms
  1259. * @property {number[]} decay - Respective decay coefficient of echo signal, in the range [0.0, 1.0]
  1260. */
  1261. /**
  1262. * @typedef {Object} ZegoUser - User object.
  1263. * @property {string} userID - User ID, a string with a maximum length of 64 bytes or less.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc. Only support numbers, English characters and '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', '/', '\'.
  1264. * @property {string} userName - User Name, a string with a maximum length of 256 bytes or less.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
  1265. */
  1266. /**
  1267. * @typedef {Object} ZegoStream - Stream object.
  1268. * @property {ZegoUser} user - User object instance.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
  1269. * @property {string} streamID - Stream ID, a string of up to 256 characters. You cannot include URL keywords, otherwise publishing stream and playing stream will fails. Only support numbers, English characters and '~', '!', '@', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', '/', '\'.
  1270. * @property {string} extraInfo - Stream extra info
  1271. */
  1272. /**
  1273. * @typedef {Object} ZegoRoomExtraInfo - Room extra information.
  1274. * @property {string} key - The key of the room extra information.
  1275. * @property {string} value - The value of the room extra information.
  1276. * @property {ZegoUser} updateUser - The user who update the room extra information.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
  1277. * @property {number} updateTime - Update time of the room extra information, UNIX timestamp, in milliseconds.
  1278. */
  1279. /**
  1280. * @typedef {Object} ZegoRect - View related coordinates.
  1281. * @property {number} x - The horizontal offset from the top-left corner
  1282. * @property {number} y - The vertical offset from the top-left corner
  1283. * @property {number} width - The width of the rectangle
  1284. * @property {number} height - The height of the rectangle
  1285. */
  1286. /**
  1287. * @typedef {Object} ZegoView - View object.
  1288. * @property {ZegoViewMode} viewMode - View mode, default is ZegoViewModeAspectFit
  1289. * @property {number} backgroundColor - Background color, the format is 0xRRGGBB, default is black, which is 0x000000
  1290. * @property {canvas} canvas - html canvas element
  1291. * @property {boolean} preserveDrawingBuffer - webgl context preserve drawing buffer
  1292. */
  1293. /**
  1294. * @typedef {Object} ZegoPublishStreamQuality - Published stream quality information.
  1295. * @property {number} videoCaptureFPS - Video capture frame rate. The unit of frame rate is f/s
  1296. * @property {number} videoEncodeFPS - Video encoding frame rate. The unit of frame rate is f/s
  1297. * @property {number} videoSendFPS - Video transmission frame rate. The unit of frame rate is f/s
  1298. * @property {number} videoKBPS - Video bit rate in kbps
  1299. * @property {number} audioCaptureFPS - Audio capture frame rate. The unit of frame rate is f/s
  1300. * @property {number} audioSendFPS - Audio transmission frame rate. The unit of frame rate is f/s
  1301. * @property {number} audioKBPS - Audio bit rate in kbps
  1302. * @property {number} rtt - Local to server delay, in milliseconds
  1303. * @property {number} packetLostRate - Packet loss rate, in percentage, 0.0 ~ 1.0
  1304. * @property {ZegoStreamQualityLevel} level - Published stream quality level
  1305. * @property {boolean} isHardwareEncode - Whether to enable hardware encoding
  1306. * @property {ZegoVideoCodecID} videoCodecID - Video codec ID
  1307. * @property {number} totalSendBytes - Total number of bytes sent, including audio, video, SEI
  1308. * @property {number} audioSendBytes - Number of audio bytes sent
  1309. * @property {number} videoSendBytes - Number of video bytes sent
  1310. */
  1311. /**
  1312. * @typedef {Object} ZegoCDNConfig - CDN config object.
  1313. * @property {string} url - CDN URL
  1314. * @property {string} authParam - Auth param of URL
  1315. */
  1316. /**
  1317. * @typedef {Object} ZegoStreamRelayCDNInfo - Relay to CDN info.
  1318. * @property {string} url - URL of publishing stream to CDN
  1319. * @property {ZegoStreamRelayCDNState} state - State of relaying to CDN
  1320. * @property {ZegoStreamRelayCDNUpdateReason} updateReason - Reason for relay state changed
  1321. * @property {number} stateTime - The timestamp when the state changed, UNIX timestamp, in milliseconds.
  1322. */
  1323. /**
  1324. * @typedef {Object} ZegoPlayerConfig - Advanced player configuration.
  1325. * @property {ZegoStreamResourceMode} resourceMode - Stream resource mode
  1326. * @property {ZegoCDNConfig} cdnConfig - The CDN configuration for playing stream. If set, the stream is play according to the URL instead of the streamID. After that, the streamID is only used as the ID of SDK internal callback.
  1327. * @property {ZegoPlayerVideoLayer} videoLayer - Set the video layer for playing the stream
  1328. */
  1329. /**
  1330. * @typedef {Object} ZegoPlayStreamQuality - Played stream quality information.
  1331. * @property {number} videoRecvFPS - Video receiving frame rate. The unit of frame rate is f/s
  1332. * @property {number} videoDejitterFPS - Video dejitter frame rate. The unit of frame rate is f/s
  1333. * @property {number} videoDecodeFPS - Video decoding frame rate. The unit of frame rate is f/s
  1334. * @property {number} videoRenderFPS - Video rendering frame rate. The unit of frame rate is f/s
  1335. * @property {number} videoKBPS - Video bit rate in kbps
  1336. * @property {number} videoBreakRate - Video break rate, the unit is (number of breaks / every 10 seconds)
  1337. * @property {number} audioRecvFPS - Audio receiving frame rate. The unit of frame rate is f/s
  1338. * @property {number} audioDejitterFPS - Audio dejitter frame rate. The unit of frame rate is f/s
  1339. * @property {number} audioDecodeFPS - Audio decoding frame rate. The unit of frame rate is f/s
  1340. * @property {number} audioRenderFPS - Audio rendering frame rate. The unit of frame rate is f/s
  1341. * @property {number} audioKBPS - Audio bit rate in kbps
  1342. * @property {number} audioBreakRate - Audio break rate, the unit is (number of breaks / every 10 seconds)
  1343. * @property {number} rtt - Server to local delay, in milliseconds
  1344. * @property {number} packetLostRate - Packet loss rate, in percentage, 0.0 ~ 1.0
  1345. * @property {number} peerToPeerDelay - Delay from peer to peer, in milliseconds
  1346. * @property {number} peerToPeerPacketLostRate - Packet loss rate from peer to peer, in percentage, 0.0 ~ 1.0
  1347. * @property {ZegoStreamQualityLevel} level - Published stream quality level
  1348. * @property {number} delay - Delay after the data is received by the local end, in milliseconds
  1349. * @property {number} avTimestampDiff - The difference between the video timestamp and the audio timestamp, used to reflect the synchronization of audio and video, in milliseconds. This value is less than 0 means the number of milliseconds that the video leads the audio, greater than 0 means the number of milliseconds that the video lags the audio, and 0 means no difference. When the absolute value is less than 200, it can basically be regarded as synchronized audio and video, when the absolute value is greater than 200 for 10 consecutive seconds, it can be regarded as abnormal
  1350. * @property {boolean} isHardwareDecode - Whether to enable hardware decoding
  1351. * @property {ZegoVideoCodecID} videoCodecID - Video codec ID
  1352. * @property {number} totalRecvBytes - Total number of bytes received, including audio, video, SEI
  1353. * @property {number} audioRecvBytes - Number of audio bytes received
  1354. * @property {number} videoRecvBytes - Number of video bytes received
  1355. */
  1356. /**
  1357. * @typedef {Object} ZegoDeviceInfo - Device Info.
  1358. * @property {string} deviceID - Device ID
  1359. * @property {string} deviceName - Device name
  1360. */
  1361. /**
  1362. * @typedef {Object} ZegoPerformanceStatus - System performance monitoring status
  1363. * @property {number} cpuUsageApp - Current CPU usage of the app, value range [0, 1]
  1364. * @property {number} cpuUsageSystem - Current CPU usage of the system, value range [0, 1]
  1365. * @property {number} memoryUsageApp - Current memory usage of the app, value range [0, 1]
  1366. * @property {number} memoryUsageSystem - Current memory usage of the system, value range [0, 1]
  1367. * @property {number} memoryUsedApp - Current memory used of the app, in MB
  1368. */
  1369. /**
  1370. * @typedef {Object} ZegoMixerAudioConfig - Mix stream audio configuration.
  1371. * @property {number} bitrate - Audio bitrate in kbps, default is 48 kbps, cannot be modified after starting a mixer task
  1372. * @property {ZegoAudioChannel} channel - Audio channel, default is Mono
  1373. * @property {ZegoAudioCodecID} codecID - codec ID, default is ZegoAudioCodecIDDefault
  1374. */
  1375. /**
  1376. * @typedef {Object} ZegoMixerVideoConfig - Mix stream video config object.
  1377. * @property {number} width - Video resolution width
  1378. * @property {number} height - Video resolution height
  1379. * @property {number} fps - Video FPS, cannot be modified after starting a mixer task
  1380. * @property {number} bitrate - Video bitrate in kbps
  1381. */
  1382. /**
  1383. * @typedef {Object} ZegoMixerInput - Mixer input.
  1384. * @property {string} streamID - Stream ID, a string of up to 256 characters. You cannot include URL keywords, otherwise publishing stream and playing stream will fails. Only support numbers, English characters and '~', '!', '@', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', '/', '\'.
  1385. * @property {ZegoMixerInputContentType} contentType - Mix stream content type
  1386. * @property {ZegoRect} layout - Stream layout. When the mixed stream is an audio stream (that is, the ContentType parameter is set to the audio mixed stream type), the layout field is not processed inside the SDK, and there is no need to pay attention to this parameter.
  1387. * @property {number} soundLevelID - If enable soundLevel in mix stream task, an unique soundLevelID is need for every stream
  1388. * @property {boolean} isAudioFocus - Whether the focus voice is enabled in the current input stream, the sound of this stream will be highlighted if enabled
  1389. */
  1390. /**
  1391. * @typedef {Object} ZegoMixerOutput - Mixer output object.
  1392. * @property {string} target - Mix stream output target, URL or stream ID, if set to be URL format, only RTMP URL surpported, for example rtmp://xxxxxxxx
  1393. */
  1394. /**
  1395. * @typedef {Object} ZegoWatermark - Watermark object.
  1396. * @property {string} imageURL - Watermark image URL, only png or jpg format surpport.
  1397. * @property {ZegoRect} layout - Watermark image layout
  1398. */
  1399. /**
  1400. * @typedef {Object} ZegoMixerTask - Mix stream task object.
  1401. * @property {string} taskID - The task ID of the task
  1402. * @property {ZegoMixerInput[]} inputList - The input list of the task
  1403. * @property {ZegoMixerOutput[]} outputList - The output list of the task
  1404. * @property {ZegoMixerVideoConfig} videoConfig - The audio config of the task
  1405. * @property {ZegoMixerAudioConfig} audioConfig - The audio config of the task
  1406. * @property {ZegoWatermark} watermark - The watermark of the task
  1407. * @property {string} backgroundImageURL - The background image URL of the task
  1408. * @property {boolean} enableSoundLevel - Enable or disable sound level callback for the task. If enabled, then the remote player can get the soundLevel of every stream in the inputlist by [onMixerSoundLevelUpdate] callback.
  1409. * @property {map<string, string>} advancedConfig - Set advanced configuration, such as specifying video encoding and others. If you need to use it, contact ZEGO technical support.
  1410. */
  1411. /**
  1412. * @typedef {Object} ZegoBroadcastMessageInfo - Broadcast message info.
  1413. * @property {string} message - message content
  1414. * @property {number} messageID - message id
  1415. * @property {number} sendTime - Message send time, UNIX timestamp, in milliseconds.
  1416. * @property {ZegoUser} fromUser - Message sender.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
  1417. */
  1418. /**
  1419. * @typedef {Object} ZegoBarrageMessageInfo - Barrage message info.
  1420. * @property {string} message - message content
  1421. * @property {string} messageID - message id
  1422. * @property {number} sendTime - Message send time, UNIX timestamp, in milliseconds.
  1423. * @property {ZegoUser} fromUser - Message sender.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
  1424. */
  1425. /**
  1426. * @typedef {Object} ZegoAudioConfig - Audio configuration.
  1427. * @property {number} bitrate - Audio bitrate in kbps, default is 48 kbps. The settings before and after publishing stream can be effective
  1428. * @property {ZegoAudioChannel} channel - Audio channel, default is Mono. The setting only take effect before publishing stream
  1429. * @property {ZegoAudioCodecID} codecID - codec ID, default is ZegoAudioCodecIDDefault. The setting only take effect before publishing stream
  1430. */
  1431. /**
  1432. * @typedef {Object} ZegoDataRecordConfig - Record config.
  1433. * @property {string} filePath - The path to save the recording file, absolute path, need to include the file name, the file name need to specify the suffix, currently supports .mp4/.flv/.aac format files, if multiple recording for the same path, will overwrite the file with the same name. The maximum length should be less than 1024 bytes.
  1434. * @property {ZegoDataRecordType} recordType - Type of recording media
  1435. */
  1436. /**
  1437. * @typedef {Object} ZegoDataRecordProgress - File recording progress.
  1438. * @property {number} duration - Current recording duration in milliseconds
  1439. * @property {number} currentFileSize - Current recording file size in byte
  1440. */
  1441. /**
  1442. * @typedef {Object} ZegoNetworkSpeedTestConfig - Network speed test config
  1443. * @property {boolean} testUplink - Test uplink or not
  1444. * @property {number} expectedUplinkBitrate - The unit is kbps. Recommended to use the bitrate in ZegoVideoConfig when call startPublishingStream to determine whether the network uplink environment is suitable.
  1445. * @property {boolean} testDownlink - Test downlink or not
  1446. * @property {number} expectedDownlinkBitrate - The unit is kbps. Recommended to use the bitrate in ZegoVideoConfig when call startPublishingStream to determine whether the network downlink environment is suitable.
  1447. */
  1448. /**
  1449. * @typedef {Object} ZegoNetworkSpeedTestQuality - network speed test quality
  1450. * @property {number} connectCost - Time to connect to the server, in milliseconds. During the speed test, if the network connection is disconnected, it will automatically initiate a reconnection, and this variable will be updated accordingly.
  1451. * @property {number} rtt - rtt, in milliseconds
  1452. * @property {number} packetLostRate - packet lost rate. in percentage, 0.0 ~ 1.0
  1453. */
  1454. /**
  1455. * @typedef {Object} ZegoAudioEffectPlayConfig - AudioEffectPlayer play configuration.
  1456. * @property {number} playCount - The number of play counts. When set to 0, it will play in an infinite loop until the user invoke [stop]. The default is 1, which means it will play only once.
  1457. * @property {boolean} isPublishOut - Whether to mix audio effects into the publishing stream, the default is false.
  1458. */
  1459. module.exports = {
  1460. ZegoScenario,
  1461. ZegoLanguage,
  1462. ZegoEngineState,
  1463. ZegoRoomState,
  1464. ZegoPublishChannel,
  1465. ZegoViewMode,
  1466. ZegoVideoMirrorMode,
  1467. ZegoSEIType,
  1468. ZegoPublisherState,
  1469. ZegoVoiceChangerPreset,
  1470. ZegoReverbPreset,
  1471. ZegoVideoConfigPreset,
  1472. ZegoStreamQualityLevel,
  1473. ZegoAudioChannel,
  1474. ZegoAudioCaptureStereoMode,
  1475. ZegoAudioCodecID,
  1476. ZegoVideoCodecID,
  1477. ZegoPlayerVideoLayer,
  1478. ZegoAECMode,
  1479. ZegoANSMode,
  1480. ZegoTrafficControlProperty,
  1481. ZegoTrafficControlMinVideoBitrateMode,
  1482. ZegoPlayerState,
  1483. ZegoPlayerMediaEvent,
  1484. ZegoStreamResourceMode,
  1485. ZegoUpdateType,
  1486. ZegoStreamRelayCDNState,
  1487. ZegoStreamRelayCDNUpdateReason,
  1488. ZegoRemoteDeviceState,
  1489. ZegoAudioDeviceType,
  1490. ZegoAudioRoute,
  1491. ZegoMixerInputContentType,
  1492. ZegoCapturePipelineScaleMode,
  1493. ZegoVideoFrameFormat,
  1494. ZegoVideoBufferType,
  1495. ZegoVideoFrameFormatSeries,
  1496. ZegoVideoFlipMode,
  1497. ZegoAudioConfigPreset,
  1498. ZegoMediaPlayerState,
  1499. ZegoMediaPlayerNetworkEvent,
  1500. ZegoMediaPlayerAudioChannel,
  1501. ZegoAudioEffectPlayState,
  1502. ZegoDataRecordType,
  1503. ZegoDataRecordState,
  1504. ZegoNetworkMode,
  1505. ZegoNetworkSpeedTestType,
  1506. ZegoTrafficControlFocusOnMode,
  1507. ZegoVideoStreamType
  1508. }