No Description

RtcEngine.native.d.ts 46KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185
  1. import { Option, Callback, AgoraUserInfo, AudioMixingOption, PlayEffectOption, AudioRecordingOption, AudioFrameOption, MixedAudioFrameOption, ImageOption, VideoStreamOption, DefaultVideoStreamOption, InjectStreamOption, RemoveInjectStreamOption, PublishStreamOption, RemovePublishStreamOption, LiveTranscodingOption, PositionOption, BeautyOption, LastmileProbeConfig, CameraCapturerConfiguration, ChannelMediaConfiguration } from "./types";
  2. /**
  3. * RtcEngine is the javascript object for control agora native sdk through react native bridge.
  4. *
  5. * You can use the RtcEngine methods to create {@link init}
  6. *
  7. * Other methods of the RtcEngine object serve for agora native sdk and set up error logging.
  8. */
  9. declare class RtcEngine {
  10. /**
  11. * @ignore eventTypes
  12. */
  13. private static readonly _eventTypes;
  14. /**
  15. * @ignore AG_PREFIX
  16. */
  17. private static readonly AG_PREFIX;
  18. /**
  19. * Creates a RtcEngine Object internal.
  20. *
  21. * This method creates and start event observer. You should call this method once.
  22. * @example `RtcEngine.init(option)`
  23. * @param options Defines the property of the client, see {@link Option} for details.
  24. */
  25. static init(options: Option): void;
  26. /**
  27. * join specified channel
  28. *
  29. * This method joins and begin rendering the video stream. when join succeeds.
  30. * Otherwise, it will invoke error by the event
  31. * @param channelName
  32. * @param uid
  33. * @param token
  34. * @param info
  35. */
  36. static joinChannel(channelName: string, uid?: number, token?: string, info?: Object): Promise<any>;
  37. /**
  38. * switch to specified channel
  39. *
  40. * This method will switch channel smoothly than you invoke leaveChannel & joinChannel.
  41. * Otherwise, it will invoke error by the event
  42. * It will occurs two events:
  43. * Occurs leaveChannel when achieve leaving stage
  44. * Occurs joinChannelSuccess when achieve joining stage
  45. * @param channelName
  46. * @param token
  47. */
  48. static switchChannel(channelName: string, token?: string): Promise<any>;
  49. /**
  50. * Starts to relay media streams across channels.
  51. *
  52. * This method will start relay media stream across specified channels. (maximum support 4 channels)
  53. * It will occurs event:
  54. * Occurs mediaRelayStateChanged
  55. * Occurs receivedChannelMediaRelay when peer channel received this message
  56. * @param config
  57. */
  58. static startChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any>;
  59. /**
  60. * Remove to relay media streams across channels.
  61. *
  62. * This method will remove & update relay media stream across specified channels. (maximum support relay 4 channels)
  63. * It will occurs event:
  64. * Occurs mediaRelayStateChanged
  65. * @param config
  66. */
  67. static removeChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any>;
  68. /**
  69. * Updates to relay media streams across channels.
  70. *
  71. * This method will update relay media stream across specified channels. (maximum support 4 channels)
  72. * It will occurs event:
  73. * Occurs mediaRelayStateChanged
  74. * @param config
  75. */
  76. static updateChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any>;
  77. /**
  78. * Stop to relay media streams across channels.
  79. *
  80. * This method will stop relay media stream across specified channels.
  81. * It will occurs event:
  82. * Occurs mediaRelayStateChanged
  83. * @param config
  84. */
  85. static stopChannelMediaRelay(): Promise<any>;
  86. /**
  87. * Registers a user account.
  88. *
  89. * Once registered, the user account can be used to identify the local user when the user joins the channel. After the user successfully registers a user account, the SDK triggers the `on("localUserRegistered", callback)` on the local client, reporting the user ID and user account of the local user.
  90. * To join a channel with a user account, you can choose either of the following:
  91. * Call the {@link registerLocalUserAccount} method to create a user account, and then the {@link joinChannelWithUserAccount} method to join the channel.
  92. * Call the {@link joinChannelWithUserAccount} method to join the channel.
  93. *
  94. * @note To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the uid of the user is set to the same parameter type.
  95. *
  96. * @param userAccount
  97. * @returns Promise<any>
  98. */
  99. static registerLocalUserAccount(userAccount: string): Promise<any>;
  100. /**
  101. * Joins the channel with a user account.
  102. *
  103. * After the user successfully joins the channel, the SDK triggers the following callbacks:
  104. *
  105. * The local client: `on("localUserRegistered", callback)` and `on("joinChannelSuccess", callback)`.
  106. * The remote client: `on("userJoined", callback)` and `on("userInfoUpdated", callback)`, if the user joining the channel is in the Communication profile, or is a BROADCASTER in the Live Broadcast profile.
  107. *
  108. * @note To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the uid of the user is set to the same parameter type.
  109. *
  110. * @param channelName
  111. * @param userAccount
  112. * @param token
  113. * @returns Promise<any>
  114. */
  115. static joinChannelWithUserAccount(channelName: string, userAccount: string, token: string): Promise<any>;
  116. /**
  117. * Gets the user information by passing in the user account.
  118. *
  119. * After receiving the "userInfoUpdated" callback, you can call this method to get the user ID of the remote user from the {@link AgoraUserInfo} object by passing in the userAccount.
  120. * @param uid
  121. * @returns Promise<{@link AgoraUserInfo}>
  122. */
  123. static getUserInfoByUid(uid: number): Promise<AgoraUserInfo>;
  124. /**
  125. * Gets the user information by passing in the user account.
  126. *
  127. * After receiving the "userInfoUpdated" callback, you can call this method to get the user ID of the remote user from the {@link AgoraUserInfo} object by passing in the userAccount.
  128. * @param userAccount
  129. * @returns Promise<{@link AgoraUserInfo}>
  130. */
  131. static getUserInfoByUserAccount(userAccount: string): Promise<AgoraUserInfo>;
  132. /**
  133. * add event listener
  134. *
  135. * This method subscribes specified eventType and run listener. You should call this method at first.
  136. *
  137. * @event listener
  138. *
  139. * ---
  140. * name | description | usage |
  141. * error | occurs when emit error | on("error", evt) |
  142. * warning | occurs when emit warning | on("warning", evt) |
  143. * messageReceived | occurs when message received | on("messageReceived", evt) |
  144. * localInvitationReceivedByPeer | occurs when local inviation received by peer | on("localInvitationReceivedByPeer", evt) |
  145. * localInvitationAccepted | occurs when local invitation accepted | on("localInvitationAccepted", evt) |
  146. * localInvitationRefused | occurs when local invitation refused | on("localInvitationRefused", evt) |
  147. * localInvitationCanceled | occurs when local invitation canceled | on("localInvitationCanceled", evt) |
  148. * localInvitationFailure | occurs when local invitation failure | on("localInvitationFailure", evt) |
  149. * remoteInvitationFailure | occurs when remote invitation failure | on("remoteInvitationFailure", evt) |
  150. * remoteInvitationReceived | occurs when remote invitation received | on("remoteInvitationReceived", evt) |
  151. * remoteInvitationAccepted | occurs when remote invitation accepted | on("remoteInvitationAccepted", evt) |
  152. * remoteInvitationRefused | occurs when remote invitation refused | on("remoteInvitationRefused", evt) |
  153. * remoteInvitationCanceled | occurs when remote invitation canceled | on("remoteInvitationCanceled", evt) |
  154. * channelMessageReceived | occurs when received channel message | on("channelMessageReceived", evt) |
  155. * channelMemberJoined | occurs when some one joined in the subscribed channel | on("channelMemberJoined", evt) |
  156. * channelMemberLeft | occurs when sone one left from u subscribed channel | on("channelMemberLeft", evt) |
  157. * tokenExpired | occurs when token has expired | on("tokenExpired", evt) |
  158. * apiCallExecute | occurs when apiCallExecute emit, this event is api call monitor | on("apiCallExecute", evt) |
  159. * joinChannelSuccess | occurs when joinChannel success | on("joinChannelSuccess", evt) |
  160. * rejoinChannelSuccess | occurs when rejoinChannel success | on("rejoinChannelSuccess", evt) |
  161. * leaveChannel | occurs when leaveChannel success | on("leaveChannel", evt) |
  162. * clientRoleChanged | occurs when setClientRole changed | on("clientRoleChanged", evt) |
  163. * userJoined | occurs when remote user joined | on("userJoined", evt) |
  164. * userOffline | this event occurs when remote user offline in rtc mode, this events only occurs host user offline in live mode | on("userOffline", evt) |
  165. * connectionStateChanged | occurs when sdk connection changed state | on("connectionStateChanged", evt) |
  166. * connectionLost | occurs when sdk connection lost | on("connectionLost", evt) |
  167. * tokenPrivilegeWillExpire | occurs when token will expire | on("tokenPrivilegeWillExpire", evt) |
  168. * requestToken | occurs when token expired | on("requestToken") |
  169. * localAudioStateChanged | occurs when local audio device state changed | on("localAudioStateChanged", (state, errorCode) => {}) |
  170. * audioVolumeIndication | occurs when audio volume indication changed | on("audioVolumeIndication", evt) |
  171. * activeSpeaker | occurs when detect active speaker | on("activeSpeaker", evt) |
  172. * firstLocalAudioFrame | occurs when sent first audio frame on local | on("firstLocalAudioFrame", evt) |
  173. * firstRemoteAudioFrame | occurs when received first audio frame from remote side | on("firstRemoteAudioFrame", evt) |
  174. * firstRemoteAudioDecoded | occurs when first remote audio decoded | on("firstRemoteAudioDecoded", evt) |
  175. * firstLocalVideoFrame | occurs when sent first video frame on local | on("firstLocalVideoFrame", evt) |
  176. * firstRemoteVideoFrame | occurs when received first video frame from remote side | on("firstRemoteVideoFrame", evt) |
  177. * userMuteAudio | occurs when user mute audio | on("userMuteAudio", evt) |
  178. * videoSizeChanged | occurs when change local or remote side video size or rotation | on("videoSizeChanged", evt) |
  179. * remoteVideoStateChanged | occurs when remote video state has any changed | on("remoteVideoStateChanged", evt) |
  180. * remoteAudioStateChanged | occurs when remote audio state has any changed | on("remoteAudioStateChanged", evt) |
  181. * localAudioStats | occurs when engine start to report local audio stats | on("localAudioStats", evt) |
  182. * localPublishFallbackToAudioOnly | occurs when published stream from local side fallback to audio stream | on("localPublishFallbackToAudioOnly", evt) |
  183. * remoteSubscribeFallbackToAudioOnly | occurs when subscribed side's stream fallback to audio stream | on("remoteSubscribeFallbackToAudioOnly", evt) |
  184. * audioRouteChanged | occurs when local audio route changed | on("audioRouteChanged", evt) |
  185. * cameraFocusAreaChanged | occurs when a camera focus area changed | on("cameraFocusAreaChanged", evt) |
  186. * cameraExposureAreaChanged | occurs when a camera exposure area changed | on("cameraExposureAreaChanged", evt) |
  187. * rtcStats | occurs when reports the statistics of the current call session once every two seconds. | on("rtcStats", evt) |
  188. * lastmileQuality | occurs when reports the last mile network quality of the local user once every two seconds before the user joins a channel.| on("lastmileQuality", evt) |
  189. * networkQuality | occurs when reports the last mile network quality of each user in the channel once every two seconds.| on("networkQuality", evt) |
  190. * localVideoStats | occurs when reports local video statistics | on("localVideoStats", evt) |
  191. * remoteVideoStats | occurs when reports remote video statistics| on("remoteVideoStats", evt) |
  192. * remoteAudioStats | occurs when reports remote audio statistics| on("remoteAudioStats", evt) |
  193. * audioEffectFinish | occurs when the local audio effect playback finishes. | on("audioEffectFinish", evt) |
  194. * streamPublished | occurs when addPublishStreamUrl success| on("streamPublished", evt) |
  195. * streamUnpublish | occurs when removePublishStreamUrl success| on("streamUnpublish", evt) |
  196. * transcodingUpdate | occurs when the cdn live streaming settings are updated | on("transcodingUpdate", evt) |
  197. * streamInjectedStatus | occurs when report the status of online injecting stream to a live broadcast | on("streamInjectedStatus", evt) |
  198. * mediaEngineLoaded | occurs when the media engine loaded | on("mediaEngineLoaded", evt) |
  199. * mediaEngineStartCall | occurs when the media engine call starts | on("mediaEngineStartCall", evt) |
  200. * startEchoTestWithInterval | occurs when startEchoTestWithInterval success | on("startEchoTestWithInterval", evt) |
  201. * audioMixingStateChanged | occurs when reports the local audio mixing state changed | on("audioMixingStateChanged", evt) |
  202. * lastmileProbeTestResult | occurs when reports the last-mile network probe result.| on("lastmileProbeTestResult", evt) |
  203. * rtmpStreamingStateChanged | occurs when reports the rtmp injecting stream state changed | on("rtmpStreamingStateChanged", evt) |
  204. * localVideoChanged | occurs when the local video changed | on("localVideoChanged", evt) |
  205. * networkTypeChanged | occurs when the device network type changed | on("networkTypeChanged", evt) |
  206. * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) |
  207. * localUserRegistered | occurs when you register user account success | on("localUserRegistered", evt) |
  208. * userInfoUpdated | occurs when you peer side using user account join channel | on("userInfoUpdated", evt) |
  209. * receivedChannelMediaRelay | occurs when you received channel media relay | on('receivedChannelMediaRelay", evt)|
  210. * mediaRelayStateChanged | occurs when you received remote media relay state changed | on('mediaRelayStateChanged", evt)|
  211. * ---
  212. *
  213. * @param eventType
  214. * @param listener
  215. * @return any
  216. */
  217. static on(eventType: string, listener: (...args: any[]) => any): any;
  218. /**
  219. * @deprecated removeAllListeners
  220. */
  221. static removeAllListeners(): void;
  222. /**
  223. * @deprecated off
  224. * @param mode
  225. */
  226. static off(evt: any): void;
  227. /**
  228. * renew token
  229. *
  230. * This method renews a new token.
  231. * @param token
  232. */
  233. static renewToken(token: string): any;
  234. /**
  235. * enable websdk interoperability
  236. *
  237. * This method used to enable websdk interoperability, so that it can connect with agora websdk apps.
  238. *
  239. * @param enabled
  240. * @return Promise<{success, value}>
  241. */
  242. static enableWebSdkInteroperability(enabled: boolean): Promise<any>;
  243. /**
  244. * get agora native sdk connection state
  245. *
  246. * This method gets agora native sdk connection state
  247. * @return Promise<{state: (connection state)}>
  248. */
  249. static getConnectionState(): Promise<any>;
  250. /**
  251. * change the client role
  252. *
  253. * This method changes the client of role.
  254. * @param role (audience: 0, host: 1)
  255. */
  256. static setClientRole(role: number): Promise<any>;
  257. /**
  258. * leave channel
  259. *
  260. * This method leaves the joined channel, then your video view will not render ever.
  261. * You should call it, when you dont need render video stream.
  262. *
  263. * @return Promise<null>
  264. */
  265. static leaveChannel(): Promise<any>;
  266. /**
  267. * destroy
  268. *
  269. * This method stops event subscribe and destroy the RtcEngine instance's.
  270. * You should call it, when you want to destroy the engine.
  271. *
  272. * @return void
  273. */
  274. static destroy(): any;
  275. /**
  276. * set local video render mode
  277. *
  278. * This method calls native sdk render mode for local video.
  279. * @param mode
  280. * @return Promise<any>
  281. */
  282. static setLocalRenderMode(mode: number): Promise<any>;
  283. /**
  284. * set the specified remote video render mode
  285. *
  286. * This method calls native sdk render mode for the specified remote video.
  287. *
  288. * @param uid
  289. * @param mode
  290. * @return Promise<any>
  291. */
  292. static setRemoteRenderMode(uid: number, mode: number): Promise<any>;
  293. /**
  294. * start video preview
  295. *
  296. * This method start video preview for video.
  297. * @return Promise<any>
  298. */
  299. static startPreview(): Promise<any>;
  300. /**
  301. * stop video preview
  302. *
  303. * This method stops video preview for video.
  304. * @return Promise<any>
  305. */
  306. static stopPreview(): Promise<any>;
  307. /**
  308. * set enable speaker phone
  309. *
  310. * This method set the speaker phone enable or disable by pass boolean parameter.
  311. * @param enabled
  312. * @return Promise<any>
  313. */
  314. static setEnableSpeakerphone(enabled: boolean): Promise<any>;
  315. /**
  316. * set default audio speaker
  317. *
  318. * This method set the default audio speaker enable or disable by pass boolean parameter.
  319. * @param enabled
  320. * @return Promise<any>
  321. */
  322. static setDefaultAudioRouteToSpeakerphone(enabled: boolean): Promise<any>;
  323. /**
  324. * set default mute all remote audio streams
  325. *
  326. * This method set default mute all remote audio streams enable or not by pass boolean parameter.
  327. * @param enabled
  328. * @return Promise<any>
  329. */
  330. static setDefaultMuteAllRemoteAudioStreams(enabled: boolean): Promise<any>;
  331. /**
  332. * enable video
  333. *
  334. * This method enables video.
  335. * @return Promise<any>
  336. */
  337. static enableVideo(): Promise<any>;
  338. /**
  339. * disable video
  340. *
  341. * This method disables video.
  342. * @return Promise<any>
  343. */
  344. static disableVideo(): Promise<any>;
  345. /**
  346. * enable local video
  347. *
  348. * This method enables the local video by the boolean parameter.
  349. * @param enabled
  350. * @return Promise<any>
  351. */
  352. static enableLocalVideo(enabled: boolean): Promise<any>;
  353. /**
  354. * mute local video stream
  355. *
  356. * This method mutes video stream by the boolean parameter.
  357. * @param muted
  358. * @return Promise<any>
  359. */
  360. static muteLocalVideoStream(muted: boolean): Promise<any>;
  361. /**
  362. * mute all remote video streams
  363. *
  364. * This method mutes all remote streams by the boolean parameter.
  365. * @param muted
  366. * @return Promise<any>
  367. */
  368. static muteAllRemoteVideoStreams(muted: boolean): Promise<any>;
  369. /**
  370. * @ignore Uint32ToInt32
  371. */
  372. private static Uint32ToInt32;
  373. /**
  374. * @ignore Int32ToUint32
  375. */
  376. private static Int32ToUint32;
  377. /**
  378. * mute specified remote video stream.
  379. *
  380. * This method mutes remote video stream by the number of uid and boolean parameter.
  381. * @param uid
  382. * @param muted
  383. * @return Promise<any>
  384. */
  385. static muteRemoteVideoStream(uid: number, muted: boolean): Promise<any>;
  386. /**
  387. * set default mute all remote video stream
  388. *
  389. * This method mutes all remote video stream default by the boolean parameter.
  390. * @param muted
  391. * @return Promise<any>
  392. */
  393. static setDefaultMuteAllRemoteVideoStreams(muted: boolean): Promise<any>;
  394. /**
  395. * enable audio
  396. *
  397. * This method enables audio
  398. * @return Promise<any>
  399. */
  400. static enableAudio(): Promise<any>;
  401. /**
  402. * disable audio
  403. *
  404. * This method disables audio
  405. * @return Promise<any>
  406. */
  407. static disableAudio(): Promise<any>;
  408. /**
  409. * enable local audio
  410. *
  411. * This method enables local audio by the boolean parameter.
  412. * @param enabled
  413. * @return Promise<any>
  414. */
  415. static enableLocalAudio(enabled: boolean): Promise<any>;
  416. /**
  417. * mute local audio stream
  418. *
  419. * This method mutes the local audio stream by muted.
  420. * @param muted
  421. * @return Promise<any>
  422. */
  423. static disableLocalAudio(muted: boolean): Promise<any>;
  424. /**
  425. * mute all remote audio streams
  426. *
  427. * This method mutes all remote audio streams by muted
  428. * @param muted boolean
  429. * @return Promise<any>
  430. */
  431. static muteAllRemoteAudioStreams(muted: boolean): Promise<any>;
  432. /**
  433. * mute specified remote audio stream by muted
  434. *
  435. * This method mutes specified remote audio stream by number uid and boolean muted.
  436. * @param uid
  437. * @param muted
  438. * @return Promise<any>
  439. */
  440. static muteRemoteAudioStream(uid: number, muted: boolean): Promise<any>;
  441. /**
  442. * adjust recording signal volume
  443. *
  444. * This method adjusts recording your signal by volume.
  445. * @param volume
  446. * @return Promise<any>
  447. */
  448. static adjustRecordingSignalVolume(volume: number): Promise<any>;
  449. /**
  450. * adjust playback signal volume
  451. *
  452. * This method adjusts playback signal by volume.
  453. * @param volume
  454. * @return Promise<any>
  455. */
  456. static adjustPlaybackSignalVolume(volume: number): Promise<any>;
  457. /**
  458. * enable audio volume indication
  459. *
  460. * This method enables audio volume by interval and smooth
  461. * @param interval
  462. * @param smooth
  463. * @return Promise<any>
  464. */
  465. static enableAudioVolumeIndication(interval: number, smooth: number): Promise<any>;
  466. /**
  467. * check for mobile phone speaker enabled
  468. *
  469. * This method checks the phone speaker is enabled
  470. * @param callback
  471. * @return any
  472. */
  473. static isSpeakerphoneEnabled(callback: Callback<any>): any;
  474. /**
  475. * enable in-ear monitor
  476. *
  477. * This method enables in-ear monitoring by boolean parameter enabled
  478. *
  479. * @param enabled
  480. * @return Promise<any>
  481. */
  482. static enableInEarMonitoring(enabled: boolean): Promise<any>;
  483. /**
  484. * set in-ear monitoring volume
  485. *
  486. * This method sets the in-ear-monitoring volume by number parameter volume
  487. *
  488. * @param volume
  489. * @return Promise<any>
  490. */
  491. static setInEarMonitoringVolume(volume: number): Promise<any>;
  492. /**
  493. * set local voice pitch
  494. *
  495. * This method sets the local voice pitch by float parameter pitch
  496. *
  497. * @param pitch
  498. * @return Promise<any>
  499. */
  500. static setLocalVoicePitch(pitch: number): Promise<any>;
  501. /**
  502. * set local voice equalization
  503. *
  504. * This method set local video equalization of band frequency by enum band number and number of gain
  505. *
  506. * @param band
  507. * @param gain
  508. * @return Promise<any>
  509. */
  510. static setLocalVoiceEqualization(band: number, gain: number): void;
  511. /**
  512. * set local voice reverb
  513. *
  514. * This method sets local voice by reverb and value
  515. * @param reverb
  516. * @param value
  517. */
  518. static setLocalVoiceReverb(reverb: number, value: number): void;
  519. /**
  520. * start audio mixing
  521. *
  522. * This method will start audio mixing by option config
  523. *
  524. * @param options {@link AudioMixingOption}
  525. */
  526. static startAudioMixing(options: AudioMixingOption): void;
  527. /**
  528. * stop audio mixing
  529. *
  530. * This methods stops for audio mixing.
  531. */
  532. static stopAudioMixing(): void;
  533. /**
  534. * pause audio mixing
  535. *
  536. * This method pauses for audio mixing.
  537. */
  538. static pauseAudioMixing(): void;
  539. /**
  540. * resume audio mixing
  541. *
  542. * This method resumes for audio mixing.
  543. */
  544. static resumeAudioMixing(): void;
  545. /**
  546. * adjust audio mixing volume
  547. *
  548. * This method adjusts audio mixing volume by the volume number parameter
  549. * @param volume
  550. */
  551. static adjustAudioMixingVolume(volume: number): void;
  552. /**
  553. * adjust audio mixing playout volume
  554. *
  555. * This method adjusts audio mixing playout by the volume parameter
  556. * @param volume
  557. */
  558. static adjustAudioMixingPlayoutVolume(volume: number): void;
  559. /**
  560. * adjust audio mixing publish volume
  561. *
  562. * This method adjusts audio mixing publish by the volume paraemter
  563. * @param volume
  564. */
  565. static adjustAudioMixingPublishVolume(volume: number): void;
  566. /**
  567. * get audio mixing duration
  568. *
  569. * This method gets the audio mixing duration
  570. * @return Promise<{success, value}>
  571. */
  572. static getAudioMixingDuration(): Promise<any>;
  573. /**
  574. * get audio mixing current position
  575. *
  576. * This method gets audio mixing current position value.
  577. * @return Promise<{success, value}>
  578. */
  579. static getAudioMixingCurrentPosition(): Promise<any>;
  580. /**
  581. * set audio mixing position
  582. *
  583. * This method sets audio mixing position by the parameter pos
  584. * @param pos
  585. */
  586. static setAudioMixingPosition(pos: number): Promise<any>;
  587. /**
  588. * get effects of volume
  589. *
  590. * This methods get audio mixing effects volume value.
  591. * @return Promise<{success, value}>
  592. */
  593. static getEffectsVolume(): Promise<any>;
  594. /**
  595. * set effects volume
  596. *
  597. * This methods set audio mixing effects volume by float parameter.
  598. * @param volume
  599. * @return Promise<{success, value}>
  600. */
  601. static setEffectsVolume(volume: number): Promise<any>;
  602. /**
  603. * set volume for playing effects.
  604. *
  605. * This methods set for playing audio mixing effects
  606. * @return Promise<{success, value}>
  607. */
  608. static setVolumeOfEffect(volume: number): Promise<any>;
  609. /**
  610. * play specified effect for audio mixing
  611. *
  612. * This methos plays the specified effect of audio mixing file by option config.
  613. * @param options {@link PlayEffectOption}
  614. * @return Promise<{success, value}>
  615. */
  616. static playEffect(options: PlayEffectOption): Promise<any>;
  617. /**
  618. * stop play effect for audio mixing
  619. *
  620. * This methods stops the specified effect for audio mixing file by soundId.
  621. * @param sounid
  622. * @return Promise<{success, value}>
  623. */
  624. static stopEffect(soundId: number): Promise<any>;
  625. /**
  626. * stop play all for effect audio mixing.
  627. *
  628. * This methods stops all effect audio mixing.
  629. * @return Promise<{success, value}>
  630. */
  631. static stopAllEffects(): Promise<any>;
  632. /**
  633. * preload effect for audio mixing file.
  634. *
  635. * This methods preloads the specified audio mixing file to memory by the soundId
  636. * @param soundId
  637. * @param filePath
  638. * @return Promise<{success, value}>
  639. */
  640. static preloadEffect(soundId: number, filePath: string): Promise<any>;
  641. /**
  642. * unload effect
  643. *
  644. * This methods unload the already loaded audio mixing file from memory by the soundId.
  645. * @param soundId
  646. * @return Promise<{success, value}>
  647. */
  648. static unloadEffect(soundId: number): Promise<any>;
  649. /**
  650. * pause the specified effect for audio mixing by soundId
  651. *
  652. * This method pauses the specified effect for audio mixing by soundId.
  653. * @param soundId
  654. * @return Promise<{success, value}>
  655. */
  656. static pauseEffect(soundId: number): Promise<any>;
  657. /**
  658. * pause all effects for audio mixing
  659. *
  660. * This method pause all effects for audio mixing.
  661. * @param soundId
  662. * @return Promise<{success, value}>
  663. */
  664. static pauseAllEffects(): Promise<any>;
  665. /**
  666. * resume audio mixing effect by the specified soundId
  667. *
  668. * This method resumes audio mixing effect by the specified soundId
  669. * @param soundId
  670. * @return Promise<{success, value}>
  671. */
  672. static resumeEffect(soundId: number): Promise<any>;
  673. /**
  674. * resume all audio mixing effects.
  675. *
  676. * This method resumes all audio mixing effects.
  677. * @return Promise<{success, value}>
  678. */
  679. static resumeAllEffects(): Promise<any>;
  680. /**
  681. * start audio recording by quality
  682. *
  683. * This method start audio recording by quality config
  684. * @param options {@link AudioRecordingOption}
  685. * @return Promise<{success, value}>
  686. */
  687. static startAudioRecording(options: AudioRecordingOption): Promise<any>;
  688. /**
  689. * stop audio recording
  690. *
  691. * This method stops audio recording.
  692. * @return Promise<{success, value}>
  693. */
  694. static stopAudioRecording(): Promise<any>;
  695. /**
  696. * set audio session operation restriction
  697. *
  698. * The SDK and the app can both configure the audio session by default. The app may occasionally use other apps or third-party components to manipulate the audio session and restrict the SDK from doing so. This method allows the app to restrict the SDK’s manipulation of the audio session.
  699. * You can call this method at any time to return the control of the audio sessions to the SDK.
  700. * This method restricts the SDK’s manipulation of the audio session. Any operation to the audio session relies solely on the app, other apps, or third-party components.
  701. * @notice iOS support only
  702. */
  703. static setAudioSessionOperationRestriction(): void;
  704. /**
  705. * @deprecated startEchoTest
  706. * startEchoTest
  707. */
  708. /**
  709. * @deprecated isCameraAutoFocusFaceModeSupported
  710. * @deprecated isCameraExposurePositionSupported
  711. * @deprecated isCameraFocusSupported
  712. * @deprecated isCameraTorchSupported
  713. * @deprecated isCameraZoomSupported
  714. * instead use {@method getCameraInfo}
  715. */
  716. /**
  717. * stop echo test
  718. *
  719. * This method stop launched an audio call test.
  720. * @return Promise<{success, value}>
  721. */
  722. static stopEchoTest(): Promise<any>;
  723. /**
  724. * enable lastmile test
  725. *
  726. * This method enables the network connection qualit test.
  727. *
  728. * @return Promise<{success, value}>
  729. */
  730. static enableLastmileTest(): Promise<any>;
  731. /**
  732. * disable lastmile test
  733. *
  734. * This method disable the network connection qualit test.
  735. *
  736. * @return Promise<{success, value}>
  737. */
  738. static disableLastmileTest(): Promise<any>;
  739. /**
  740. * set recording audio frame parameters
  741. *
  742. * This method Sets the audio recording format for the audioFrame callback.
  743. *
  744. * @param options {@link RecordingAudioFrameOption}
  745. * @return Promise<{success, value}>
  746. */
  747. static setRecordingAudioFrameParameters(options: AudioFrameOption): Promise<any>;
  748. /**
  749. * set playback audio frame parameters
  750. *
  751. * This method Sets the audio frame format for the playbackFrame callback.
  752. *
  753. * @param options {@link AudioFrameOption}
  754. * @return Promise<{success, value}>
  755. */
  756. static setPlaybackAudioFrameParameters(options: AudioFrameOption): Promise<any>;
  757. /**
  758. * set mixed audio frame parameters
  759. *
  760. * This method Sets the audio frame format for the mixedAudioFrame callback.
  761. *
  762. * @param options {@link MixedAudioFrameOption}
  763. * @return Promise<{success, value}>
  764. */
  765. static setMixedAudioFrameParameters(options: MixedAudioFrameOption): Promise<any>;
  766. /**
  767. * add video watermark
  768. *
  769. * This method adds video watermark to the local video.
  770. *
  771. * @param options {@link ImageOption}
  772. * @return Promise<{success, value}>
  773. */
  774. static addVideoWatermark(options: ImageOption): Promise<any>;
  775. /**
  776. * clear video watermarks
  777. *
  778. * This method removes the watermark image from the video stream added by addVideoWatermark.
  779. *
  780. * @return Promise<{success, value}>
  781. */
  782. static clearVideoWatermarks(): Promise<any>;
  783. /**
  784. * set local publish fallback
  785. *
  786. * This method sets the fallback option for the locally published video stream based on the network conditions.
  787. *
  788. * @param option {0, 1, 2} [more details](https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_constants.html#a3e453c93766e783a7e5eca05b1776238)
  789. * @return Promise<{success, value}>
  790. */
  791. static setLocalPublishFallbackOption(option: number): Promise<any>;
  792. /**
  793. * set remote publish fallback
  794. *
  795. * This method sets the fallback option for the remotely subscribed video stream based on the network conditions.
  796. *
  797. * @param option {0, 1, 2} [more details](https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_constants.html#a3e453c93766e783a7e5eca05b1776238)
  798. * @return Promise<{success, value}>
  799. */
  800. static setRemoteSubscribeFallbackOption(option: number): Promise<any>;
  801. /**
  802. * enable dual stream mode
  803. *
  804. * This method enables the dual stream by parameter mode.
  805. *
  806. * @param enabled
  807. * @return Promise<{success, value}>
  808. */
  809. static enableDualStreamMode(enabled: boolean): Promise<any>;
  810. /**
  811. * set remote video stream type
  812. *
  813. * This method sets the remote video stream type by uid and streamType.
  814. *
  815. * @param options {@link VideoStreamOption}
  816. * @return Promise<{success, value}>
  817. */
  818. static setRemoteVideoStreamType(options: VideoStreamOption): Promise<any>;
  819. /**
  820. * set remote default video stream type
  821. *
  822. * This method sets the default video stream type.
  823. *
  824. * @param options {@link DefaultVideoStreamOption}
  825. * @return Promise<{success, value}>
  826. */
  827. static setRemoteDefaultVideoStreamType(options: DefaultVideoStreamOption): Promise<any>;
  828. /**
  829. * add inject stream url
  830. *
  831. * This method injects an online media stream to a live broadcast.
  832. *
  833. * @param options {@link InjectStreamOption}
  834. * @return Promise<{success, value}>
  835. */
  836. static addInjectStreamUrl(options: InjectStreamOption): Promise<any>;
  837. /**
  838. * remove inject stream url
  839. *
  840. * This method removes stream by addInjectsStreamUrl.
  841. *
  842. * @param options {@link RemoveInjectStreamOption}
  843. * @return Promise<{success, value}>
  844. */
  845. static removeInjectStreamUrl(options: RemoveInjectStreamOption): Promise<any>;
  846. /**
  847. * @deprecated sendMessage
  848. * sendMessage
  849. */
  850. static sendMessage(): Promise<any>;
  851. /**
  852. * @deprecated createDataStream
  853. * createDataStream
  854. */
  855. /**
  856. * @deprecated setupLocalVideo
  857. * setupLocalVideo
  858. */
  859. /**
  860. * @deprecated setupRemoteVideo
  861. * setupRemoteVideo
  862. */
  863. /**
  864. * @deprecated setVideoQualityParameters
  865. * setVideoQualityParameters
  866. */
  867. /**
  868. * set local video mirror mode
  869. *
  870. * This method sets local video mirror mode
  871. *
  872. * @param mode
  873. * @return Promise<{success, value}>
  874. */
  875. static setLocalVideoMirrorMode(mode: number): Promise<any>;
  876. /**
  877. * switch camera
  878. *
  879. * This method switches camera between front and rear.
  880. *
  881. * @return Promise<{success, value}>
  882. */
  883. static switchCamera(): Promise<any>;
  884. /**
  885. * set camera zoom ratio
  886. *
  887. * This method sets the camera zoom ratio.
  888. *
  889. * @param zoomFactor
  890. * @return Promise<{success, value}>
  891. */
  892. static setCameraZoomFactor(zoomFactor: number): Promise<any>;
  893. /**
  894. * get camera max zoom ratio
  895. *
  896. * This method gets the camera maximum zoom ratio.
  897. *
  898. * @notice Android Only
  899. * @return Promise<{success, value}>
  900. */
  901. static getCameraMaxZoomFactor(): Promise<any>;
  902. /**
  903. * set camera focus position in preview
  904. *
  905. * This method sets the mannual focus position.
  906. *
  907. * @param options {@link PositionOption}
  908. * @return Promise<{success, value}>
  909. */
  910. static setCameraFocusPositionInPreview(options: PositionOption): Promise<any>;
  911. /**
  912. * set camera exposure position
  913. *
  914. * This method sets the mannual exposure position.
  915. *
  916. * @param options {@link PositionOption}
  917. * @return Promise<{success, value}>
  918. */
  919. static setCameraExposurePosition(options: PositionOption): Promise<any>;
  920. /**
  921. * set camera torch on
  922. *
  923. * This method enables the camera flash function.
  924. *
  925. * @param enabled
  926. * @return Promise<{success, value}>
  927. */
  928. static setCameraTorchOn(enabled: boolean): Promise<any>;
  929. /**
  930. * set enable auto focus face mode
  931. *
  932. * This method enables auto-focus face mode function.
  933. *
  934. * @param enabled boolean
  935. * @return Promise<{success, value}>
  936. */
  937. static setCameraAutoFocusFaceModeEnabled(enabled: boolean): Promise<any>;
  938. /**
  939. * get call id
  940. *
  941. * This method is used to get call id.
  942. *
  943. * @return Promise<{success, value}>
  944. */
  945. static getCallId(): Promise<any>;
  946. /**
  947. * set log file and log filter
  948. *
  949. * This method sets the log file generated path and specified the log level.
  950. *
  951. * @param filePath string
  952. * @param level enum
  953. * @param maxfileSize integer (KB)
  954. * @return Promise<{success, value}>
  955. */
  956. static setLog(filePath: string, level: number, maxfileSize: number): Promise<any>;
  957. /**
  958. * add publish stream url
  959. *
  960. * This method add publish stream by option.
  961. *
  962. * @param options {@link PublishStreamOption}
  963. * @return Promise<{success, value}>
  964. */
  965. static addPublishStreamUrl(options: PublishStreamOption): Promise<any>;
  966. /**
  967. * remove publish stream url
  968. *
  969. * This method remove publish stream by options.
  970. *
  971. * @param options {@link RemovePublishStreamOption}
  972. * @return Promise<{success, value}>
  973. */
  974. static removePublishStreamUrl(options: RemovePublishStreamOption): Promise<any>;
  975. /**
  976. * set live transcoding
  977. *
  978. * This method sets the video layout and audio settings for CDN live.
  979. *
  980. * @param options {@link LiveTranscoding}
  981. * @return Promise<{success, value}>
  982. */
  983. static setLiveTranscoding(options: LiveTranscodingOption): Promise<any>;
  984. /**
  985. * get sdk version
  986. *
  987. * This method gets the sdk version details and passed it into callback function
  988. *
  989. * @param callback to handle resolve from getSdkVersion
  990. * @param errorHandler to handle reject error from getSdkVersion
  991. * @return any
  992. */
  993. static getSdkVersion(callback: Callback<any>, errorHandler?: Callback<any>): any;
  994. /**
  995. * mute local audio stream
  996. *
  997. * This method sends/stops sending the local audio.
  998. *
  999. * @param enabled
  1000. * @return Promise<any>
  1001. */
  1002. static muteLocalAudioStream(enabled: boolean): Promise<any>;
  1003. /**
  1004. * video pre-process/post-process
  1005. *
  1006. * This method enables/disables image enhancement and sets the options.
  1007. *
  1008. * @param enable boolean
  1009. * @param options {@link BeautyOptions}
  1010. * @return Promise<any>
  1011. */
  1012. static setBeautyEffectOptions(enabled: boolean, options: BeautyOption): Promise<any>;
  1013. /**
  1014. * set local voice change
  1015. *
  1016. * This method changes local speaker voice with voiceChanger
  1017. *
  1018. * @param voiceChanger integer
  1019. * @voiceChanger value ranges [
  1020. * 0: "The original voice",
  1021. * 1: "An old man’s voice",
  1022. * 2: "A little boy’s voice.",
  1023. * 3: "A little girl’s voice.",
  1024. * 4: "TBD",
  1025. * 5: "Ethereal vocal effects.",
  1026. * 6: "Hulk’s voice."
  1027. * ]
  1028. * @return Promise<any>
  1029. */
  1030. static setLocalVoiceChanger(voiceChanger: number): Promise<any>;
  1031. /**
  1032. * set the preset local voice reverberation effect.
  1033. *
  1034. * This method sets the preset local voice reverberation effect.
  1035. *
  1036. * @param preset integer
  1037. * @return Promise<any>
  1038. */
  1039. static setLocalVoiceReverbPreset(preset: number): Promise<any>;
  1040. /**
  1041. * control stereo panning for remote users
  1042. *
  1043. * This method enables/disables stereo panning for remote users.
  1044. *
  1045. * @param enabled boolean
  1046. * @return Promise<any>
  1047. */
  1048. static enableSoundPositionIndication(enabled: boolean): Promise<any>;
  1049. /**
  1050. * set the sound position of a remote user
  1051. *
  1052. * This method sets the sound position of a remote user by uid
  1053. *
  1054. * @param uid number | The ID of the remote user
  1055. * @param pan float | The sound position of the remote user. The value ranges from -1.0 to 1.0
  1056. * @pan
  1057. * 0.0: the remote sound comes from the front.
  1058. * -1.0: the remote sound comes from the left.
  1059. * 1.0: the remote sound comes from the right.
  1060. * @param gain float | Gain of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original gain of the remote user). The smaller the value, the less the gain.
  1061. * @return Promise<any>
  1062. */
  1063. static setRemoteVoicePosition(uid: number, pan: number, gain: number): Promise<any>;
  1064. /**
  1065. * start the lastmile probe test
  1066. *
  1067. * This method start the last-mile network probe test before joining a channel to get the uplink and downlink last-mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT).
  1068. *
  1069. * @param config LastmileProbeConfig {@link LastmileProbeConfig}
  1070. *
  1071. * event onLastmileQuality: the SDK triggers this callback within two seconds depending on the network conditions. This callback rates the network conditions with a score and is more closely linked to the user experience.
  1072. * event onLastmileProbeResult: the SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective.
  1073. * @return Promise<any>
  1074. */
  1075. static startLastmileProbeTest(config: LastmileProbeConfig): Promise<any>;
  1076. /**
  1077. * stop the lastmile probe test
  1078. *
  1079. * This method stop the lastmile probe test.
  1080. *
  1081. * @return Promise<any>
  1082. */
  1083. static stopLastmileProbeTest(): Promise<any>;
  1084. /**
  1085. * sets the priority of a remote user's media stream.
  1086. *
  1087. * note: Use this method with the setRemoteSubscribeFallbackOption method. If the fallback function is enabled for a subscribed stream, the SDK ensures the high-priority user gets the best possible stream quality.
  1088. *
  1089. * This method sets the priority of a remote user's media stream.
  1090. * @param uid number
  1091. * @param userPriority number | The value range is [50 is "user's priority is high", 100 is "the default user's priority is normal"]
  1092. *
  1093. * @return Promise<any>
  1094. */
  1095. static setRemoteUserPriority(uid: number, userPriority: number): Promise<any>;
  1096. /**
  1097. * start an audio call test.
  1098. *
  1099. * note:
  1100. * Call this method before joining a channel.
  1101. * After calling this method, call the stopEchoTest method to end the test. Otherwise, the app cannot run the next echo test, or call the joinChannel method.
  1102. * In the Live-broadcast profile, only a host can call this method.
  1103. * This method will start an audio call test with interval parameter.
  1104. * In the audio call test, you record your voice. If the recording plays back within the set time interval, the audio devices and the network connection are working properly.
  1105. *
  1106. * @param interval number
  1107. *
  1108. * @return Promise<any>
  1109. */
  1110. static startEchoTestWithInterval(interval: number): Promise<any>;
  1111. /**
  1112. * set the camera capture preference.
  1113. *
  1114. * note:
  1115. * For a video call or live broadcast, generally the SDK controls the camera output parameters. When the default camera capture settings do not meet special requirements or cause performance problems, we recommend using this method to set the camera capture preference:
  1116. * If the resolution or frame rate of the captured raw video data are higher than those set by setVideoEncoderConfiguration, processing video frames requires extra CPU and RAM usage and degrades performance. We recommend setting config as CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE(1) to avoid such problems.
  1117. * If you do not need local video preview or are willing to sacrifice preview quality, we recommend setting config as CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE(1) to optimize CPU and RAM usage.
  1118. * If you want better quality for the local video preview, we recommend setting config as CAPTURER_OUTPUT_PREFERENCE_PREVIEW(2).
  1119. *
  1120. * This method will set the camera capture preference.
  1121. *
  1122. * @param config {@link CameraCapturerConfiguration}
  1123. *
  1124. * @return Promise<any>
  1125. */
  1126. static setCameraCapturerConfiguration(config: CameraCapturerConfiguration): Promise<any>;
  1127. /**
  1128. * Gets the audio mixing volume for local playback.
  1129. *
  1130. * note:
  1131. * This method helps troubleshoot audio volume related issues.
  1132. *
  1133. * @return Promise<any>
  1134. */
  1135. static getAudioMixingPlayoutVolume(): Promise<any>;
  1136. /**
  1137. * Gets the audio mixing volume for publishing.
  1138. *
  1139. * note:
  1140. * This method helps troubleshoot audio volume related issues.
  1141. *
  1142. * @return Promise<any>
  1143. */
  1144. static getAudioMixingPublishVolume(): Promise<any>;
  1145. /**
  1146. * sendMediaData for media observer.
  1147. *
  1148. * note:
  1149. * This method needs you invoke registerMediaMetadataObserver success first and you could send media data through interval media observer feature.
  1150. * The data have limit length is 1024 bytes, if you pass data length bigger than limit it will failed.
  1151. * @param data String: 1024 bytes limit
  1152. * @return Promise<any>
  1153. */
  1154. static sendMediaData(data: String): Promise<any>;
  1155. /**
  1156. * Registers the metadata observer.
  1157. *
  1158. * note:
  1159. * This method only work in live mode
  1160. * This method enables you to add synchronized metadata in the video stream for more diversified live broadcast interactions, such as sending shopping links, digital coupons, and online quizzes.
  1161. * This method trigger 'mediaMetaDataReceived' event, here is example:
  1162. * ```javascript
  1163. * RtcEngine.on("mediaMetaDataReceived", (data) => {
  1164. * console.log("mediaMetaDataReceived", data);
  1165. * })
  1166. * ```
  1167. * @return Promise<any>
  1168. */
  1169. static registerMediaMetadataObserver(): Promise<any>;
  1170. /**
  1171. * Get local device camera support info
  1172. *
  1173. * note:
  1174. * This method returns your current device camera support info.
  1175. * ```javascript
  1176. * RtcEngine.getCameraInfo().then(info => {
  1177. * console.log("your currrent camera", info);
  1178. * })
  1179. * ```
  1180. * @return Promise{cameraSupportInfo}>
  1181. */
  1182. static getCameraInfo(): Promise<any>;
  1183. }
  1184. export default RtcEngine;