Event | Feature |
---|---|
join_room_succ | Called when the channel joined |
join_room_fail | Called when the channel joining failed |
update_publish_url | After "publish", returns the stream publishing URL |
remote_stream_add | Notification of remote user publishing |
remote_stream_subscribed | Called upon successful subscription to remote video media streams, returns URL of the stream pulling. |
remote_stream_remove | Called upon the disruption or conclusion of remote media stream publishing. |
on(event: "join_room_succ", callback: (null) => void);
Room joined
on(event: "join_room_fail", callback: (reason: string) => void);
Room joining failed
on(event: "update_publish_url", callback: ({url: string}) => void);
Callback triggers when a user calls publishMedia; obtains the stream pushing address URL to start stream publishing.
Parameter | Description |
---|---|
url | Stream pushing address |
on(event: "remote_stream_add", callback: ({uid: number}) => void);
Detect a remote media stream in the channel; you can then subscribe according to the service requirements.
Parameter | Description |
---|---|
uid | Remote user ID |
on(event: "remote_stream_subscribed", callback: ({uid: number, url: string}) => void);
Parameter | Description |
---|---|
uid | Remote user ID |
url | Stream pushing address |
on(event: "remote_stream_remove", callback: ({uid: number}) => void);
When remote media streams stop, cancels pulling streams for viewing according to service requirements.
Parameter | Description |
---|---|
uid | Remote user ID |