# Custom Media Streams

**URL:** <https://devforum.zoom.us/t/custom-media-streams/60262>\
**Category:** Web\
**Created:** [November 15, 2021, 12:09pm UTC](https://devforum.zoom.us/t/custom-media-streams/60262 "2021-11-15T12:09:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravana](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@saravana](https://devforum.zoom.us/u/saravana)\
**Post date:** [November 15, 2021, 12:09pm UTC](https://devforum.zoom.us/t/custom-media-streams/60262/1 "2021-11-15T12:09:56Z")

</div>

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](https://github.com/spite/virtual-webcam/blob/master/js/media-devices.js). 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

```auto
  q.read().then(function(e) {
                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?**  
2.0.1

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [November 17, 2021, 12:25am UTC](https://devforum.zoom.us/t/custom-media-streams/60262/2 "2021-11-17T00:25:03Z")

</div>

Hi, @saravana,

I see you’ve linked this post [here](https://devforum.zoom.us/t/framereader-read-null-frame-videos-are-no-longer-appearing-in-chrome/58530/15), to keep a single source for this particular issue, we kindly ask that you respond on this post.

> [@Framereader read null frame! (Videos are no longer appearing in Chrome)](https://devforum.zoom.us/t/framereader-read-null-frame-videos-are-no-longer-appearing-in-chrome/58530/17):
>
> Hi, Thank you for writing us, @saravana! It sounds like your camera requires a certain format. To ensure the best support, we will need more information pertaining to your camera setup along with details about the framework you are using ? This information will help us provide more personalized support as well as debug the behavior you’ve encountered. Best, Donte

Thank. you!  
Donte

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 17, 2021, 10:25am UTC](https://devforum.zoom.us/t/custom-media-streams/60262/3 "2021-12-17T10:25:32Z")

</div>

Closed on December 17, 2021, 10:25am UTC

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