123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- import { View, ViewProps } from 'react-native';
-
- declare module "IAgora";
-
- export interface VideoEncoderConfig {
- width: number,
- height: number,
- bitrate: number,
- frameRate: number,
- orientationMode: number,
- }
-
- export interface Option {
- appid: String,
- videoProfile: number
- channelProfile: number,
- videoEncoderConfig: VideoEncoderConfig,
- clientRole: number,
- audioProfile: number,
- audioScenario: number
- }
-
- export interface PublisherConfig {
- width: number,
- height: number,
- framerate: number,
- bitrate: number,
- defaultLayout: number,
- lifeCycle: number,
- pubishUrl: string,
- rawStreamUrl: string,
- extraInfo: String,
- owner: boolean
- }
-
- export interface BackgroundImage {
- url: string,
- x: number,
- y: number,
- width: number,
- height: number
- }
-
- export interface Rect {
- x: number,
- y: number,
- width: number,
- height: number
- }
-
- export interface Size {
- width: number,
- height: number
- }
-
- export interface TranscodingUser {
- uid: number,
- zOrder: number,
- rect: Rect,
- alpha: number,
- audioChannel: number
- }
-
- export interface Color {
- red: number,
- green: number,
- blue: number,
- alpha: number
- }
-
- export interface LiveTranscoding {
- size: Size,
- videoBitrate: number,
- videoFramerate: number,
- lowLatency: boolean,
- videoGop: number,
- videoCodecProfile: number,
- transcodingUsers: Array<TranscodingUser>,
- transcodingExtraInfo: string,
- watermark: BackgroundImage,
- backgroundImage: BackgroundImage,
- backgroundColor: Color,
- audioSampleRate: number,
- audioBitrate: number,
- audioChannels: number,
- }
-
- export interface VideoOption {
- uid: Number,
- renderMode: number,
- reactTag: number
- }
-
- export interface EventScheduler {
- onWarning: Function,
-
- onError: Function,
-
- onJoinChannelSuccess: Function,
-
- onRejoinChannelSuccess: Function,
-
- onLeaveChannel: Function,
-
- onClientRoleChanged: Function,
-
- onUserJoined: Function,
-
- onUserOffline: Function,
-
- onConnectionStateChanged: Function,
-
- onConnectionInterrupted?: Function,
-
- onConnectionLost: Function,
-
- onConnectionBanned: Function,
-
- onApiCallExecuted: Function,
-
- onTokenPrivilegeWillExpire: Function,
-
- onRequestToken: Function,
-
- onMicrophoneEnabled: Function,
-
- onAudioVolumeIndication: Function,
-
- onActiveSpeaker: Function,
-
- onFirstLocalAudioFrame: Function,
-
- onFirstRemoteAudioFrame: Function,
-
- onVideoStopped: Function,
-
- onFirstLocalVideoFrame: Function,
-
- onFirstRemoteVideoDecoded: Function,
-
- onFirstRemoteVideoFrame: Function,
-
- onUserMuteAudio: Function,
-
- onUserMuteVideo: Function,
-
- onUserEnableVideo: Function,
-
- onUserEnableLocalVideo: Function,
-
- onVideoSizeChanged: Function,
-
- onRemoteVideoStateChanged: Function,
-
- onLocalPublishFallbackToAudioOnly: Function,
-
- onRemoteSubscribeFallbackToAudioOnly: Function,
-
- onAudioRouteChanged: Function,
-
- onCameraReady: Function,
-
- onCameraFocusAreaChanged: Function,
-
- onCameraExposureAreaChanged: Function,
-
- onAudioQuality: Function,
-
- onRtcStats: Function,
-
- onLastmileQuality: Function,
-
- onNetworkQuality: Function,
-
- onLocalVideoStats: Function,
-
- onRemoteVideoStats: Function,
-
- onRemoteAudioStats: Function,
-
- onLocalVideoStat: Function,
-
- onRemoteVideoStat: Function,
-
- onRemoteAudioTransportStats: Function,
-
- onRemoteVideoTransportStats: Function,
-
- onAudioMixingFinished: Function,
-
- onAudioEffectFinished: Function,
-
- onStreamPublished: Function,
-
- onStreamUnpublished: Function,
-
- onTranscodingUpdated: Function,
-
- onStreamInjectedStatus: Function,
-
- onStreamMessage: Function,
-
- onStreamMessageError: Function,
-
- onMediaEngineLoadSuccess: Function,
-
- onMediaEngineStartCallSuccess: Function,
- // onWarning: Function,
- // onError: Function,
- // onJoinChannelSuccess: Function,
- // onRejoinChannelSuccess: Function,
- // onLeaveChannel: Function,
- // onApiCallExecute: Function,
- // onClientRoleChanged: Function,
- // onUserJoined: Function,
- // onUserOffline: Function,
- // onConnectionStateChanged: Function,
- // onConnectionInterrupted: Function,
- // onTokenPrivilegeWillExpire: Function,
- // onRequestToken: Function,
-
- // DidMicrophoneEnabled: Function,
- // ReportAudioVolumeIndicationOfSpeakers: Function,
- // ActiveSpeaker: Function,
- // FirstLocalAudioFrame: Function,
- // FirstRemoteAudioFrameOfUid: Function,
- // VideoDidStop: Function,
- // FirstLocalVideoFrameWithSize: Function,
- // FirstRemoteVideoDecodedOfUid: Function,
- // FirstRemoteVideoFrameOfUid: Function,
- // DidAudioMuted: Function,
- // DidVideoMuted: Function,
- // DidVideoEnabled: Function,
- // DidLocalVideoEnabled: Function,
- // VideoSizeChangedOfUid: Function,
- // RemoteVideoStateChangedOfUid: Function,
- // DidLocalPublishFallbackToAudioOnly: Function,
- // DidRemoteSubscribeFallbackToAudioOnly: Function,
-
- // DeviceTypeStateChanged: Function,
- // DidAudioRouteChanged: Function,
- // CameraDidReady: Function,
- // CameraFocusDidChangedToRect: Function,
- // CameraExposureDidChangedToRect: Function,
-
- // ReportRtcStats: Function,
- // LastmileQuality: Function,
- // NetworkQuality: Function,
- // LocalVideoStats: Function,
- // RemoteVideoStats: Function,
- // RemoteAudioStats: Function,
- // AudioTransportStatsOfUid: Function,
- // VideoTransportStatsOfUid: Function,
-
- // LocalAudioMixingDidFinish: Function,
- // RemoteAudioMixingDidStart: Function,
- // RemoteAudioMixingDidFinish: Function,
- // DidAudioEffectFinish: Function,
-
- // StreamPublished: Function,
- // StreamUnpublish: Function,
- // TranscodingUpdated: Function,
-
- // StreamInjectedStatus: Function,
-
- // ReceiveStreamMessage: Function,
- // DidOccurStreamMessageError: Function,
-
- // MediaEngineDidLoaded: Function,
- // MediaEngineDidStartCall: Function,
-
- // ConnectionDidInterrupted: Function,
- // ConnectionDidBanned: Function,
- // AudioQualityOfUi: Function
- }
-
- export type Callback<T> = (err: any, data: any) => T;
-
- export type Nullable<T> = T | null | undefined;
-
- export type String = Nullable<string>;
- export type Number = Nullable<number> | 0;
-
- export interface AgoraViewProps extends ViewProps {
- showLocalVideo: boolean,
- remoteUid: Number,
- zOrderMediaOverlay: boolean,
- [key:string]: any;
- }
|