/

Common Events


Common Events

The following events are common across all Subscriber implementations from the Red5 Pro HTML SDK. They can be accessed from the global red5prosdk object from the SubscriberEventTypes attribute.

AccessNameMeaning
CONNECT_SUCCESS'Connect.Success'When the subscriber has established a required remote connection, such as to a WebSocket or RTMP-based server.
CONNECT_FAILURE'Connect.Failure'When the subscriber has failed to establish a required remote connection for consuming a stream.
SUBSCRIBE_START'Subscribe.Start'When the subscriber has started a subscribing to a stream.
SUBSCRIBE_FAIL'Subscribe.Fail'When the subscriber has failed to start subscribing to a stream.
SUBSCRIBEINVALIDNAME'Subscribe.InvalidName'When the subscriber is cannot start subscribing to stream because a stream associated with the streamName is not available.
SUBSCRIBE_STOP'Subscribe.Stop'When the subscriber has successfully closed an active subscription to a stream.
SUBSCRIBE_METADATA'Subscribe.Metadata'When metadata is received on the client from the server.
SUBSCRIBESENDINVOKE'Subscribe.Send.Invoke'When a message is being sent by a subscribed-to publisher.
PLAY_UNPUBLISH'Subscribe.Play.Unpublish'Notification of when a live broadcast has stopped publishing.
CONNECTION_CLOSED'Subscribe.Connection.Closed'Invoked when a close to the connection is detected.
ORIENTATION_CHANGE'Subscribe.Orientation.Change'Invoked when an orientation change is detected in metadata. Mobile (iOS and Android) broadcasts are sent with an orientation.
VOLUME_CHANGE'Subscribe.Volume.Change'Invoked when a change to volume is detected during playback. From 0 to 1.
PLAYBACKTIMEUPDATE'Subscribe.Time.Update'Invoked when a change in playhead time is detected during playback. In seconds.
PLAYBACKSTATECHANGE'Subscribe.Playback.Change'Invoked when a change in playback state has occured, such as when going from a Playback.PAUSED state to Playback.PLAYING state.
FULLSCREENSTATE_CHANGE'Subscribe.FullScreen.Change'Invoked when a change in fullscreen state occurs during playback.
AUTOPLAYBACKFAILURE'Subscribe.Autoplay.Failure'Invoked when an attempt to autoplay on a media element throws a browser exception; typically due to browser security restrictions and their autoplay policies. (WebRTC and HLS, only)
AUTOPLAYBACKMUTED'Subscribe.Autoplay.Muted'Invoked when an attempt to autoplay on a media element throws a browser exception and is muted based on the muteOnAutoplayRestriction config property; typically due to browser security restrictions and their autoplay policies. (WebRTC and HLS, only)