Class: OpenViduStreams

OpenViduStreams()

OpenVidu implementation of MediaStreams.

Constructor

new OpenViduStreams()

Source:

Extends

Members

instance

There can be only one
Inherited From:
Source:

Methods

attachAudioStream()

Attaches an audio stream to a mesh (e.g. avatar)
Inherited From:
Source:

attachVideoStream()

Attaches a videoStream to a VideoAvatar
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
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: