The EnxStream is a derived Class from EnxRtc. It handles all Media Stream related functions to initiate, configure and to transport streams to EnableX Media Servers. It is also used for receiving stream end-points to be played.

References: AttributesMethodsObservers

Private Attributes

  • id – Unique Stream ID
  • local – Boolean. True for Local Stream; False for Remote Stream
  • room – JSON Object. Room Into to which the Stream is associated
  • showing – Boolean. Whether the stream is being played
  • audio – Boolean. True if the stream has Audio Track
  • video – Boolean. True if the stream has Video Track
  • screen – Boolean. True if the stream has Screen Share
  • videoSize – Size of Video Frame, defined as [minWidth, minHeight, maxWidth, maxHeight]
  • videoFrameRate – Frame Rate of Video Stream, defined as [min, max]
  • desktopStreamId – Chrome Media Source ID to be used for Screen Share
  • extensionId – Extension ID to be used for Screen Share
  • audioMuted – Boolean. True if Audio is muted
  • videoMuted – Boolean. True if Video is muted
  • attributes – videoFrameRate

Methods

Given below a categorized listing of methods:

Stream Information

Stream Conrols

  • muteSelfAudio() – To mute/unmute audio of own published stream
  • muteSelfVideo() – To mute/unmute video of own published stream
  • switchCamera() – To switch from rear to front Camera and vice-versa to change Stream Source

Moderator Controls

Miscellaneous

Observers & their Callbacks

Stream Observer

Given below is a list of Callbacks of Stream Observer categorized by their functions. The Room Observer is initiated with along with Room Initialization Process.

Streaming

  • onRemoteStreamAudioMute() – Everyone is notified when when user’s audio is muted
  • onRemoteStreamAudioUnMute() – Everyone is notified when when user’s audio is unmuted
  • onAudioEvent() – When any action is performed on Audio track of a Stream
  • onVideoEvent() – When any action is performed on Video track of a Stream

Messaging

  • onReceivedData() – When text messages are received

Hard Mute Audio Observer

ObserverEnxStream.setMuteAudioStreamObserver(EnxMuteAudioStreamObserver-Object) – to receive callbacks listed below:

  • onHardMutedAudio – Moderator is acknowledged when User’s audio stream is hard-muted
  • onHardUnMutedAudio – Moderator is acknowledged when User’s audio stream is hard-unmuted
  • onReceivedHardMuteAudio – Participant is notified that Moderator has hard-muted his audio stream
  • onReceivedHardUnMuteAudio – Participant is notified that Moderator has hard-unmuted his audio stream

Hard Mute Video Observer

ObserverEnxStream.setMuteVideoStreamObserver(EnxMuteVideoStreamObserver-Object) – to receive callbacks listed below:

  • onHardMutedVideo – Moderator is acknowledged when User’s video stream is hard-muted
  • onHardUnMutedVideo – Moderator is acknowledged when User’s video stream is hard-unmuted
  • onReceivedHardMuteVideo – Participant is notified that Moderator has hard-muted his video stream
  • onReceivedHardUnMuteVideo – Participant is notified that Moderator has hard-unmuted his video stream

Explore Android SDK