Class: OpenViduStreams

OpenViduStreams()

OpenVidu implementation of MediaStreams.

Constructor

new OpenViduStreams()

Source:

Extends

Classes

MediaStreams

Members

instance

There can be only one
Inherited From:
Source:

soundProperties

Default values for streaming sound, see https://doc.babylonjs.com/typedoc/interfaces/BABYLON.ISoundOptions
Inherited From:
Source:

Methods

attachAudioStream(mesh, mediaStream, options)

Creates babylon Sound object from the stram with default parameters, and attaches it to the mesh (e.g. avatar).
Parameters:
Name Type Description
mesh babylon mesh to attach to
mediaStream MediaStream to attach
options custom sound options, defaults to soundProperties, see https://doc.babylonjs.com/typedoc/interfaces/BABYLON.ISoundOptions
Inherited From:
Source:
Returns:
created babylon Sound object, or null if stream contains no audio tracks

attachVideoStream(client)

Attaches a videoStream to a VideoAvatar
Parameters:
Name Type Description
client Client that streams
Inherited From:
Source:

(async) connect(token)

Connect to server with given parameters, calls init.
Parameters:
Name Type Description
token whatever is needed to connect and initialize the session
Inherited From:
Source:

getClientId()

Retrieve VRSpace Client id from WebRTC subscriber data
Inherited From:
Source:

getStream()

Retrieve MediaStream from subscriber data
Inherited From:
Source:

(async) init(callback)

Initialize streaming and attach event listeners. Intended to be overridden, default implementation throws error.
Parameters:
Name Type Description
callback executed when new subscriber starts playing the stream
Overrides:
Source:

playStream()

function to play video of a client
Inherited From:
Source:

publish(htmlElement)

Start publishing local video/audio FIXME opevidu implementation
Parameters:
Name Type Description
htmlElement needed only for local feedback (testing)
Inherited From:
Source:

publishAudio()

Enable/disable (mute) audio
Inherited From:
Source:

publishVideo()

Enable/disable video
Inherited From:
Source:

removeClient()

Remove a client, called when client leaves the space
Inherited From:
Source:

streamingStart()

Called when a new stream is received. Tries to find an existing client, and if found, calls attachAudioStream and attachVideoStream.
Inherited From:
Source:

streamToMesh()

Called when a new client enters the space. Tries to find an existing stream, and if found, calls attachAudioStream and attachVideoStream.
Inherited From:
Source: