constraints: {
audio: true,
video: true
}
constraints: {
audio: true,
video: false
}
Even for testing purposes, it is recommended to have at least 1 Gb of heap. Usually, WCS uses ~200 M of heap when no publishers and players on server.This is happening on development side, so only 1-2 streams are published, I will increase the ram just in case.
Constraints cannot be changed on-the-fly, so stream has to be restarted.If we start the stream on ios with { audio: true, video: false } , how can we switch to {audio: true, video: true}, without having to stop the stream ?
publishStream = session.createStream({
name: streamName,
display: localVideo,
...
}).on(STREAM_STATUS.PUBLISHING, function (stream) {
setStatus("#publishStatus", STREAM_STATUS.PUBLISHING);
onPublishing(stream);
stream.muteVideo(); // mute video on successful publishing
...
});
publishStream.publish();
publishStream.unmuteVideo(); // unmute when needed