Custom Media Streams

I am working on app that renders content in a HTML canvas element and it needs to be sent to Zoom Meeting as a participant video. The Component and Client View of Zoom Web SDK doesn’t provide a way to send custom media streams.

To bypass this issue, Canvas streams are captured using canvas.captureStream method and use it as one of the video input by overriding browser’s native navigator.mediaDevices.getUserMedia method like this code. Canvas captureStream produces videoframes with I420A pixel format. But Zoom websdk supports only I420 and NV12 formats. It is failing in WASM code.

Is there is better way to implement this feature using Zoom Web SDK ? Are there any plans to support custom media streams in the SDK ?

Browser Console Error
It fails with the following error
TypeError: can’t access property “format”, i is undefined

The Zoom WASM code where the error occurred. Variable i is undefined because the video frame format is neither I420 nor NV12 {
                var t = e.done
                  , r = e.value;
                if (t)
                    r && r.close();
                else {
                    var i, n = r;
                    if ("undefined" == n || null == n || null == n.format || "undefined" == n.format)
                        return console.error("framereader read null frame!"),
                        void ("close"in n && n.close());
                    n.format && "I420" == n.format ? i = {
                        frame: n,
                        format: 2
                    } : n.format && "NV12" == n.format && (i = {
                        frame: n,
                        format: 3
                    var a = n.visibleRect ? n.visibleRect.width : n.cropWidth
                      , o = n.visibleRect ? n.visibleRect.height : n.cropHeight;
					  ///Check Error 
                    Me === a && Ce === o && lt === i.format || (Me = a,
                    Ce = o,
                    vt.rgba_stride = a,
                    vt.rgba_x = 0,
                    vt.rgba_y = 0,
                    lt = i.format,

Which Web Meeting SDK version?

Hi, @saravana,

I see you’ve linked this post here, to keep a single source for this particular issue, we kindly ask that you respond on this post.

Thank. you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.