Reputation: 11
Due to the recent EOL announcement of twilio Programmable video feature. We are evaluating Zoom video-sdk as part of migration plan.
We are stuck at a point where we see that in zoom video-sdk we cannot share more that two streams (one as video stream & one as screens hare) of a user simultaneoustly. In our use case, user can have multiple screens + video input devices connected and we should be able to identify and share all such screens & video streams simultaneouly.
This use case was possible in case of twilio as they allowed sharing multiple, 2 or more, localTracks (video + screen streams) simultaneously.
// TwilioCode snippet - takes arary of local tracks as input
Twilio.Video.connect(token, {tracks: [{video1}, {video2}, ...]})
However with Zoom SDK when we tried customizing this zoom-websample project we found that in case of zoom there is a single media stream object. that does not allow more than one video + screen share stream
// zoom video-sdk code snippet
client = ZoomVideo.createClient();
client.init()
await client.join(token, {topic, userName, signature})
stream = client.getMediaStream()
// I cannot do more than one startScreenShare or startVideo on this stream instance
stream.startShareScreen()
Does anyone know if we can achieve multi-stream in zoom video-sdk from a single user?
We did tried some solution like having some dummy users to joint he zoom call topic per device. But, the sdk seems to not keep a track of client.join
post first successful join request
Upvotes: 0
Views: 258
Reputation: 134
Zoom Developer Advocate here.
Currently with the Zoom Video SDK for web, you can send up to 2 video streams per user. The first through the video channel, and the second through the screen share channel.
Sending via the video channel:
let cameras = stream.getCameraList()
if(stream.isRenderSelfViewWithVideoElement()) {
await stream.startVideo({ videoElement: document.querySelector('#my-self-view-video'), cameraId: cameras[0].deviceId })
// video 1 successfully started and rendered
} else {
await stream.startVideo({ cameraId: cameras[0].deviceId })
await stream.renderVideo(document.querySelector('#my-self-view-canvas'), client.getCurrentUserInfo().userId, 1920, 1080, 0, 0, 3)
// video 1 successfully started and rendered
}
Rendering the video stream for remote users.
Sending via the screen share channel:
let cameras = stream.getCameraList()
if(stream.isStartShareScreenWithVideoElement()) {
await stream.startShareScreen(document.querySelector('#my-second-camera-video'), { secondaryCameraId: cameras[1].deviceId })
// video 2 successfully started and rendered
} else {
await stream.startShareScreen(document.querySelector('#my-second-camera-canvas'), { secondaryCameraId: cameras[1].deviceId })
// video 2 successfully started and rendered
}
Rendering the screen share stream for remote users.
For sending more than 2 videos streams per user, or more than 1 video stream with an actual screen share, we would love to learn more about your use case and see how we can best support it. Feel free to move the discussion over to the Zoom devforum.
Upvotes: 0