The EnxStream is a derived Class from EnxRtc. It handles all the Media Stream-related functions to initiate, configure, and transport Streams to EnableX Media Servers. It is also used for receiving Stream endpoints to be played.
id– Unique Stream ID.
local– Boolean. True for Local Stream, False for Remote Stream.
room– JSON Object. Room with which the Stream is associated.
showing– Boolean. Whether the stream is being played.
audio– Boolean. True if the stream carries Audio Track.
video– Boolean. True if the stream carries Video Track.
screen– Boolean. True if the stream carries 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.
A categorized listing of Stream Handler methods is as given below:
– To close and stop publishing the local Stream.
– To play Video on EnableX Player in a given DOM ID.
– To stop playing Video on EnableX Player.
– This method provides the ID of the given Stream.
– To get all attributes of the Stream.
– To know if the stream has an Audio Track.
– To know if the stream has a Video Track.
– To know if the stream has Text Data.
– To know if the stream has Screen Share.
– To update / set attributes of local Stream.
– To update bandwidth requirement for audio and video for local Stream.
– To mute audio of local Stream.
– To mute video of local Stream.
– To unmute audio of local Stream.
– To unmute video of local Stream.
– To take a Raw Image Snapshot of Stream into Canvas Object.
switchMicrophone()– To switch Audio source of local Stream to another Microphone connected to the device.
switchCamera()– To switch Video source of local Stream to another Camera connected to the device.
media-access-allowed– When access is granted to Camera and Microphone.
media-access-denied– When access is denied for Camera and Microphone.
stream-attributes-updated– When local Stream attributes are updated.