Streams a video successfully by managing the local stream, updating parameters, and handling video transport.
This method initiates the video streaming process by updating the local video stream with the new stream,
creating or connecting to the video transport, and notifying participants of the streaming status.
Param: options
The options for streaming the video.
Param: options.stream
The media stream to be used for the video.
Param: options.parameters
The parameters required for streaming.
Param: options.parameters.socket
The socket instance for real-time communication.
Param: options.parameters.participants
The list of participants in the session.
Param: options.parameters.localStream
The local media stream.
Param: options.parameters.transportCreated
Indicates if the transport has already been created.
Param: options.parameters.transportCreatedVideo
Indicates if the video transport has been created.
Streams a video successfully by managing the local stream, updating parameters, and handling video transport.
This method initiates the video streaming process by updating the local video stream with the new stream, creating or connecting to the video transport, and notifying participants of the streaming status.
Param: options
The options for streaming the video.
Param: options.stream
The media stream to be used for the video.
Param: options.parameters
The parameters required for streaming.
Param: options.parameters.socket
The socket instance for real-time communication.
Param: options.parameters.participants
The list of participants in the session.
Param: options.parameters.localStream
The local media stream.
Param: options.parameters.transportCreated
Indicates if the transport has already been created.
Param: options.parameters.transportCreatedVideo
Indicates if the video transport has been created.
Param: options.parameters.videoAlreadyOn
Indicates if the video is already on.
Param: options.parameters.videoAction
Indicates if a video action is being performed.
Param: options.parameters.videoParams
The parameters for the video producer.
Param: options.parameters.localStreamVideo
The local video stream.
Param: options.parameters.defVideoID
The default video device ID.
Param: options.parameters.userDefaultVideoInputDevice
The user's default video input device.
Param: options.parameters.params
Additional parameters for the producer.
Param: options.parameters.videoParamse
Additional parameters for the video.
Param: options.parameters.islevel
The level of the user (e.g., host, participant).
Param: options.parameters.member
The member's name in the session.
Param: options.parameters.updateMainWindow
Indicates if the main window should be updated.
Param: options.parameters.lock_screen
Indicates if the screen is locked.
Param: options.parameters.shared
Indicates if the screen is shared.
Param: options.parameters.videoAlreadyOn
Indicates if the video is already on.
Param: options.parameters.showAlert
Function to show alert messages.
Param: options.parameters.updateParticipants
Function to update the participants list.
Param: options.parameters.updateTransportCreatedVideo
Function to update the transport creation state.
Param: options.parameters.updateVideoAlreadyOn
Function to update the video status.
Param: options.parameters.updateVideoAction
Function to update the video action state.
Param: options.parameters.updateLocalStream
Function to update the local stream.
Param: options.parameters.updateLocalStreamVideo
Function to update the local video stream.
Param: options.parameters.updateUserDefaultVideoInputDevice
Function to update the default video input device.
Param: options.parameters.updateCurrentFacingMode
Function to update the current facing mode.
Param: options.parameters.updateDefVideoID
Function to update the default video device ID.
Param: options.parameters.updateAllowed
Function to update the allowed state.
Param: options.parameters.updateUpdateMainWindow
Function to update the main window state.
Param: options.parameters.createSendTransport
Function to create a send transport for video.
Param: options.parameters.connectSendTransportVideo
Function to connect the send transport for video.
Param: options.parameters.resumeSendTransportAudio
Function to resume audio transport.
Returns
A promise that resolves when the video has been successfully streamed.
Throws
Throws an error if there is an issue with streaming the video.
Example