Callback Events

Callback List

EventFeature
join_room_succCalled when the channel joined
join_room_failCalled when the channel joining failed
update_publish_urlAfter "publish", returns the stream publishing URL
remote_stream_addNotification of remote user publishing
remote_stream_subscribedCalled upon successful subscription to remote video media streams, returns URL of the stream pulling.
remote_stream_removeCalled upon the disruption or conclusion of remote media stream publishing.

Callback Details

join_room_succ

on(event: "join_room_succ", callback: (null) => void);

Room joined

join_room_fail

on(event: "join_room_fail", callback: (reason: string) => void);

Room joining failed

update_publish_url

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.

ParameterDescription
urlStream pushing address

remote_stream_add

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.

ParameterDescription
uidRemote user ID

remote_stream_subscribed

on(event: "remote_stream_subscribed", callback: ({uid: number, url: string}) => void);
ParameterDescription
uidRemote user ID
urlStream pushing address

remote_stream_remove

on(event: "remote_stream_remove", callback: ({uid: number}) => void);

When remote media streams stop, cancels pulling streams for viewing according to service requirements.

ParameterDescription
uidRemote user ID

Was this page helpful?

Helpful Not helpful
Submitted! Your feedback would help us improve the website.
Feedback
Top