# You must pass a \<video\> element to start video capture for Chromium browser, Android browser, and Chrome without SharedArrayBuffer support

**URL:** <https://devforum.zoom.us/t/you-must-pass-a-video-element-to-start-video-capture-for-chromium-browser-android-browser-and-chrome-without-sharedarraybuffer-support/72900>\
**Category:** Web\
**Created:** [July 25, 2022, 2:57pm UTC](https://devforum.zoom.us/t/you-must-pass-a-video-element-to-start-video-capture-for-chromium-browser-android-browser-and-chrome-without-sharedarraybuffer-support/72900 "2022-07-25T14:57:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamieson](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jamieson](https://devforum.zoom.us/u/jamieson)\
**Post date:** [July 25, 2022, 2:57pm UTC](https://devforum.zoom.us/t/you-must-pass-a-video-element-to-start-video-capture-for-chromium-browser-android-browser-and-chrome-without-sharedarraybuffer-support/72900/1 "2022-07-25T14:57:33Z")

</div>

**Description**  
Hi. I have seen questions posted related to this error already but wasn’t able to solve my issue after reading through those. I have just started working with the Video SDK and am unable to simply start a video session because of this error. I am following the documentation exactly, and have copied the exact code from step three [here] in order to render the video, so I’m not sure why there is an error.

**Browser Console Error**

1. reason: “You must pass a element to start video capture for Chromium browser, Android browser, and Chrome without SharedArrayBuffer support.”
2. type: “INVALID\_PARAMETERS”

**Which Web Video SDK version?**  
1.3.0

**Video SDK Code Snippets**

```auto
import React from 'react';
import ZoomVideo from '@zoom/videosdk'
import { generateVideoToken } from '../../utils/util';

interface Props {
    setLoading: any;
}

const ActiveSession: React.FC<Props> = (props: any) => {
    const [activeSession, setActiveSession] = React.useState<boolean>(false);
    const client = ZoomVideo.createClient();

    client.init('en-US', 'CDN');

    let stream:any;

    const endActiveSession = () => {
        if(client){
            client.leave();
            setActiveSession(false);
        }
    }

    const startVideo = async (stream:any) => {
        if(!!window.chrome && !(typeof SharedArrayBuffer === 'function')) {
            // if desktop Chrome or Edge (Chromium) with SharedArrayBuffer not enabled
            stream.startVideo({ videoElement: document.querySelector('#self-view-video') })
        } else {
            // all other browsers and desktop Chrome or Edge (Chromium) with SharedArrayBuffer enabled
            stream.startVideo(() => {
                stream.renderVideo(document.querySelector('#self-view-canvas'), client.getCurrentUserInfo().userId, 1920, 1080, 0, 0, 3)
            })
        }
    }

    const openActiveSession = async () => {
        props.setLoading(true);
        const sdkKey = ;
        const sdkSecret = ;
        const topic = "My First Session"
        const token = generateVideoToken(
           sdkKey, sdkSecret, topic
        );
        const userName = "jamieson";
        const password = "Jumb0tr0n!";
        await client.join(topic, token, userName, password).then(() => {
            stream = client.getMediaStream();
            setActiveSession(true);
            startVideo(stream);
          }).catch((error) => {
            console.log(error)
            props.setLoading(false)
          })
    }

    return (
        <div className="w-[100%]">
            {activeSession ? (
                <div className="w-[100%] flex flex-col items-center">
                    <video id='self-view-video' />
                    <canvas id='self-view-canvas'></canvas>
                    <button className="btn-primary btn-blue" onClick={endActiveSession}>End Session</button>
                </div>
            ) : (
                <>
                <div 
                    className="w-[100%] h-[336px] border border-1 border-vibrantBlue bg-vibrantBlue/[0.04] 
                    rounded-[14px] flex items-center justify-center text-vibrantBlue"
                >
                    <div className="flex flex-col items-center">
                        <h5 className='font-bold text-[22px] mb-[12px]'>No Active Session</h5>
                        <p className="text-[16px] mb-[24px]">Click below to start a new session.</p>
                        <button className="btn-primary btn-blue mx-auto" onClick={openActiveSession}>
                            New
                        </button>
                    </div>
                </div>
                </>
                
            )}
            
        </div>
    );
}

export default ActiveSession;

```

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Click the “New” button to generate token and call the client.getMediaStream() method. After this succeeds, the startVideo() function is called, which tries to call stream.startVideo or stream.renderVideo. This is when the error is triggered.

**Device (please complete the following information):**

- Device: Macbook Pro
- OS: macOS 12.2.1
- Browser: Chrome
- Browser Version: Chrome Version 99.0.4844.74 (Official Build) (arm64)

---

<div class="post-metadata">

**Author:** ![dajneem23](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dajneem23/32/39441_2.png) [@dajneem23](https://devforum.zoom.us/u/dajneem23)\
**Post date:** [July 25, 2022, 4:34pm UTC](https://devforum.zoom.us/t/you-must-pass-a-video-element-to-start-video-capture-for-chromium-browser-android-browser-and-chrome-without-sharedarraybuffer-support/72900/2 "2022-07-25T16:34:38Z")

</div>

Read this.  
if you not have Chrome Origin Trials token u must use video element in chromium browser

> **[Web SDK Gallery View](https://marketplace.zoom.us/docs/sdk/overview/websdk-gallery-view/)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

---

<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:** [August 25, 2022, 2:35am UTC](https://devforum.zoom.us/t/you-must-pass-a-video-element-to-start-video-capture-for-chromium-browser-android-browser-and-chrome-without-sharedarraybuffer-support/72900/3 "2022-08-25T02:35:10Z")

</div>

Closed on August 25, 2022, 2:35am UTC

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