Common Events
The following events are common across all Subscriber implementations from the Red5 Pro WebRTC SDK. They can be accessed from the global red5prosdk object from the SubscriberEventTypes attribute.
| Access | Name | Meaning | 
|---|---|---|
CONNECT_SUCCESS | 
Connect.Success | 
When the subscriber has established a required remote connection, such as to a WebSocket 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. | 
SUBSCRIBE_INVALID_NAME | 
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. | 
SUBSCRIBE_STATUS | 
‘Subscribe.Status’ | When a status event of the subscriber has been receieved from the server. | 
SUBSCRIBE_SEND_INVOKE | 
‘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. | 
PLAYBACK_TIME_UPDATE | 
Subscribe.Time.Update | 
Invoked when a change in playhead time is detected during playback. In seconds. | 
PLAYBACK_STATE_CHANGE | 
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. | 
FULL_SCREEN_STATE_CHANGE | 
Subscribe.FullScreen.Change | 
Invoked when a change in fullscreen state occurs during playback. | 
AUTO_PLAYBACK_FAILURE | 
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)See section on Autoplay Restrictions | 
AUTO_PLAYBACK_MUTED | 
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)See section on Autoplay Restrictions | 
SUBSCRIBE_PUBLISHER_CONGESTION | 
‘Subscribe.Publisher.NetworkCongestion’ | When a playback session is experiencing network congestion on the broadcast side. | 
SUBSCRIBE_PUBLISHER_RECOVERY | 
‘Subscribe.Publisher.NetworkRecovery’ | When a playback session is recovering from network congestion on the broadcast side. |