설명 없음

RtcEngine.native.d.ts 47KB

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