Skip to main content

Stream Control

start_stream

After a presentation ends, re-start the local stream with the previously active options.
It can also be used after devices are changed. See Device Manager for further information.
If screen = true, video => false.

eyeson.send({
type: 'start_stream',
audio: true | false, // default: true
video: true | false, // default: true
screen: true | false, // default: false
virtualBackground: true | false, // default: false
});

The screen parameter is used to switch from camera to screen stream. Use the surface option to pre-select the desired options. Skip or set null for browser default. Detect availablility for UI with FeatureDetector.canChooseDisplaySurface(). More info.

eyeson.send({
type: 'start_stream',
audio: true | false, // set true to add microphone
screen: true,
surface: null | 'monitor' | 'window' | 'browser' // optional; used only if screen=true
});

change_stream

Update a stream e.g. to toggle audio/video/screen.

info

To avoid issues with some devices, you can use StreamHelpers to toggle audio.

eyeson.send({
type: 'change_stream',
audio: true | false,
video: true | false,
screen: true | false,
surface: null | 'monitor' | 'window' | 'browser' // optional; used only if screen=true
});

toggle_camera

Update the cameras facing mode on mobile devices.

eyeson.send({
type: 'toggle_camera',
stream: localStream,
facingMode: 'user' | 'environment'
});

replace_stream

Replace current stream with any custom MediaStream.
(First audio track and/or first video track with readyState = "live" are used)

eyeson.send({
type: 'replace_stream',
stream
});

change_screen_video

Trigger screenshare selection during screen cam. Further information.

eyeson.send({ type: 'change_screen_video' });