/

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_SUCCESSConnect.SuccessWhen the subscriber has established a required remote connection, such as to a WebSocket or RTMP-based server.
CONNECT_FAILUREConnect.FailureWhen the subscriber has failed to establish a required remote connection for consuming a stream.
SUBSCRIBE_STARTSubscribe.StartWhen the subscriber has started a subscribing to a stream.
SUBSCRIBE_FAILSubscribe.FailWhen the subscriber has failed to start subscribing to a stream.
SUBSCRIBE_INVALID_NAMESubscribe.InvalidNameWhen the subscriber is cannot start subscribing to stream because a stream associated with the streamName is not available.
SUBSCRIBE_STOPSubscribe.StopWhen the subscriber has successfully closed an active subscription to a stream.
SUBSCRIBE_METADATASubscribe.MetadataWhen metadata is received on the client from the server.
SUBSCRIBE_SEND_INVOKE'Subscribe.Send.InvokeWhen a message is being sent by a subscribed-to publisher.
PLAY_UNPUBLISHSubscribe.Play.UnpublishNotification of when a live broadcast has stopped publishing.
CONNECTION_CLOSEDSubscribe.Connection.ClosedInvoked when a close to the connection is detected.
ORIENTATION_CHANGESubscribe.Orientation.ChangeInvoked when an orientation change is detected in metadata. Mobile (iOS and Android) broadcasts are sent with an orientation.
VOLUME_CHANGESubscribe.Volume.ChangeInvoked when a change to volume is detected during playback. From 0 to 1.
PLAYBACK_TIME_UPDATESubscribe.Time.UpdateInvoked when a change in playhead time is detected during playback. In seconds.
PLAYBACK_STATE_CHANGESubscribe.Playback.ChangeInvoked when a change in playback state has occured, such as when going from a Playback.PAUSED state to Playback.PLAYING state.
FULL_SCREEN_STATE_CHANGESubscribe.FullScreen.ChangeInvoked when a change in fullscreen state occurs during playback.
AUTO_PLAYBACK_FAILURESubscribe.Autoplay.FailureInvoked 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_MUTEDSubscribe.Autoplay.MutedInvoked 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