Publishing Streams
Last updated
Last updated
Before allowing the end user to publish video you should make sure you have received a VIDEO_STATE_AVAILABLE
state from the event.
To publish the stream you call the method. By default this will publish both the video and audio track within the current local media stream.
If you wish to specify which tracks to publish you can provide the sendAudio
and sendVideo
options.
The following is an example when you publish the stream with video and without the audio:
You may unpublish video in the channel and remain connected to a video channel (so you still see and hear others) using the methhod.
Event
Description
onVideoAvailabilityChange
This event will let you know when the publishing video is available (meaning you are connected to a video channel). The possible states are AloVideo.VIDEO_STATE_AVAILABLE and AloVideo.VIDEO_STATE_UNAVAILABLE.
onParticipantsChanged
onPublishedStreamChange
When a remotely published stream changes in anyway (for example, the participant removed the audio track ) this event will be fired.
When a participant (including the current user) published/unpublished video this event will be dispatched. See for more information.