Class RCAudienceLivingRoom
Constructors
constructor
- new RCAudienceLivingRoom(_context: RTCContext, _runtime: IRuntime, _initOptions: IRCRTCInitOptions, _roomId: string, _joinResData: { kvEntries: IServerRTCRoomEntry[]; token: string }, livingType: RCLivingType, _useMutilPeerC?: boolean, _clientSessionId?: string): RCAudienceLivingRoom
Parameters
_context: RTCContext
_runtime: IRuntime
_roomId: string
_joinResData: { kvEntries: IServerRTCRoomEntry[]; token: string }
kvEntries: IServerRTCRoomEntry[]
token: string
Optional _useMutilPeerC: boolean
_clientSessionId: string = ...
Methods
__destroy
- __destroy(quitRoom: boolean): Promise<void>
Parameters
Returns Promise<void>
__getPC
Returns default[]
__onReconnected
- __onReconnected(): Promise<void>
Returns Promise<void>
addSubscribeTask
Parameters
addUnsubscribeTask
Parameters
getCDNInfo
- getCDNInfo(): { CDNEnable: undefined | boolean; fps: RCFrameRate; resolution: RCResolution } | { CDNEnable: boolean; fps: undefined; resolution: undefined }
Returns { CDNEnable: undefined | boolean; fps: RCFrameRate; resolution: RCResolution } | { CDNEnable: boolean; fps: undefined; resolution: undefined }
getCDNPlayUrl
Parameters
Returns Promise<{ CDNPlayUrl?: string; code: RCRTCCode }>
getClientSessionId
- getClientSessionId(): string
Returns string
getCrtUserId
Returns string
getLocalTrack
Parameters
getRemoteMCUTracks
getRemoteRTCTracks
getRemoteTrack
Parameters
getRemoteTracks
getRemoteTracksByUserId
Parameters
getRemoteUserIds
- getRemoteUserIds(): string[]
Returns string[]
getRoomId
Returns string
getSessionId
Returns string
onAudioLevelChange
- onAudioLevelChange(handler: null | IAudioLevelChangeHandler, gap?: number): void
Parameters
handler: null | IAudioLevelChangeHandler
Optional gap: number
Returns void
registerReportListener
Parameters
Returns void
registerRoomEventListener
Parameters
Returns void
subscribe
Parameters
unsubscribe
Parameters
观众直播房间类 处理: 1、通知观众房间内 人员变更、资源变更 2、观众订阅、取消订阅资源