No Description

RtcEngine.native.d.ts 46KB

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