Jocloud provides reliable QoE (quality of experience) for real-time audio/video communications through a global real-time network.
ThunderBolt-WebRtc is a JavaScript library loaded through HTML web pages. It connects through browser APIs to operate audio and video controls. Its global network APIs combine flexibly to realize reliable real-time audio communication between webs or between web and mobile, or PC clients.
Video interaction and audio-only interaction share the same Web SDK.
API | Description |
---|---|
new WebRTC | Create a WebRTC object |
init | Initialize |
isSupported | Check whether the browser supports Jocloud Web SDKs |
getSupportedCodec | Get the supported code |
isScreenShareSupported | Determine whether screen sharing is supported |
VERSION | Version number |
on | Add event bindings |
off | Cancel event bindings |
API | Description |
---|---|
joinRoom | Join a channel |
leaveRoom | Leave a channel |
setArea | Set the user region |
API | Function |
---|---|
updateToken | Update a token |
Callback | Description |
---|---|
token_request | The token expired, needs to be updated immediately |
token_will_expire | The token will expire, needs to be updated |
sdk_auth_result | Return token authentication results |
API | Description |
---|---|
createStream | Create audio/video streams |
closeStream | Close audio/video streams |
publish | Publish audio/video streams |
unpublish | Cancel audio/video stream publishing |
setPublisherVolume | Set microphone volume |
setVideoMode | Switch local video stream brackets |
changeDevice | Switch input devices |
Callback | Description |
---|---|
publish_auth_fail | Failure to pass the publishing authentication will cut off the publishing |
audio_track_end | Audio track ended, often encountered during mid-publishing microphone disconnection |
video_track_end | Video track ended, often encountered during mid-publishing camera disconnection |
API | Description |
---|---|
subscribe | Subscribe to audio/video streams |
unsubscribe | Unsubscribe to audio/video streams |
Callback | Description |
---|---|
remote_stream_add | Detect a remote media stream in the channel; you can then subscribe according to the service requirements. |
remote_stream_remove | When a remote media stream stops, the subscription is canceled according to service requirements. |
remote_stream_update | A remote stream is updating. No need to process it. |
API | Description |
---|---|
play | Play the stream |
stopPlay | Stop playing the stream |
resume | Resume playing the stream |
isPlaying | Determine whether the stream is playing |
setAudioVolume | Set the playing volume |
setAudioOutputDevice | Select the playing device |
Callback | Description |
---|---|
player_state_change | The player status changes |
API | Description |
---|---|
hasAudio | Determine whether there is an audio |
hasVideo | Determine whether there is a video |
enableAudio | Enable the audio |
disableAudio | Disable the audio |
enableVideo | Enable the video |
disableVideo | Disable the video |
Callback | Description |
---|---|
stream_reconnect_start | Media stream starts reconnecting |
stream_reconnect_end | Media stream reconnected |
first_audio_frame_decode | Subscribe to the first decoded audio frame |
first_video_frame_decode | Subscribe to the first decoded video frame |
API | Description |
---|---|
addPublishOriginStreamUrl | Add the address of a source stream pushing to CDN |
removePublishOriginStreamUrl | Remove the address of a source stream pushing to CDN |
addPublishTranscodingStreamUrl | Add the address of a mixed stream pushing to CDN |
removePublishTranscodingStreamUrl | Remove the address of a mixed stream pushing to CDN |
setLiveTranscodingTask | Set a stream mixing task |
removeLiveTranscodingTask | Remove a stream mixing task |
API | Description |
---|---|
addSubscribe | Subscribe across rooms |
removeSubscribe | Cancel the cross-room subscription |
API | Description |
---|---|
createDualStream | Create a dual-channel video stream |
changeRemoteVideoStreamType | Select high/low quality streams |
API | Description |
---|---|
startAudioMixing | Enable audio mixing |
stopAudioMixing | Disable audio mixing |
pauseAudioMixing | Pause audio mixing |
resumeAudioMixing | Resume audio mixing |
setAudioMixingVolume | Set the audio mixing volume |
getAudioMixingDuration | Get the total duration of audio mixing |
getAudioMixingTime | Get the current audio mixing time |
setAudioMixingTime | Set the audio mixing time |
stopAllAudioMixing | Disable all audio mixing |
pauseAllAudioMixing | Pause all audio mixing |
resumeAllAudioMixing | Resume all audio mixing |
Callback | Description |
---|---|
audio_mixing_played | Audio mixing started |
audio_mixing_finished | Audio mixing completed |
API | Description |
---|---|
getPublisherAudioLevel | Get the current output stream volume |
getSubscriberAudioLevel | Get the current subscribed stream volume |
enableAudioLevelReport | Enable audio volume reporting |
disableAudioLevelReport | Disable audio volume reporting |
Callback | Description |
---|---|
active_speaker | The user in the channel with the loudest voice changes |
audio_level_report | Report volume events regularly every 2 seconds |
API | Description |
---|---|
getDevices | Get all audio/video devices |
getAudioDevices | Get audio input devices such as microphones |
getVideoDevices | Get video input devices such as cameras |
getPlayoutDevices | Get playing devices |
Callback | Description |
---|---|
audio_input_changed | The audio input device added or removed |
video_input_changed | The video input device added or removed |
audio_output_changed | The audio output device added or removed |
Callback | Description |
---|---|
network_score | Report the local user's uplink and downlink network quality scores every 2 seconds |
connected | Server connection succeeded |
reconnect | Reconnecting to the server |
API | Description |
---|---|
getSystemStats | Get the system information |
getSignalConnectionState | Get the connection status of the signaling channel |
getMediaConnectionState | Get the connection status of the media channel |
getSessionStats | Get the session-level connection statistics |
getUplinkVideoStats | Get the uplink video stream statistics |
getUplinkAudioStats | Get the uplink audio stream statistics |
getDownlinkVideoStats | Get the downlink video stream statistics |
getDownlinkAudioStats | Get the downlink audio stream statistics |
API | Description |
---|---|
setLogLevel | Set the log level |