# Video handle is not ready!

**URL:** <https://devforum.zoom.us/t/video-handle-is-not-ready/100021>\
**Category:** Video SDK\
**Created:** [December 12, 2023, 8:28pm UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021 "2023-12-12T20:28:23Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![devs2](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/devs2/32/44406_2.png) [@devs2](https://devforum.zoom.us/u/devs2)\
**Post date:** [December 12, 2023, 8:28pm UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/1 "2023-12-12T20:28:23Z")

</div>

### Format Your New Topic as Follows:

**Video SDK Type and Version**  
VideoSDK 1.9.8 for Web

**Description**  
Sometimes sporadically when attempting to join a meeting on mobile we get a message in the console (note that the console doesn’t show this message as an error, Chrome is filtering it as “info”):

```auto
video handle is not ready! blob:https://example.com/11e1bd00-f55d-41b0-b82e-673d81388dd9:1

```

The video connection never starts for the user however audio does

**Troubleshooting Routes**  
Disconnecting and reconnecting the user sometimes fixes the problem. As does refreshing. Video preview still works while in this state if we open our applications interface to test/select your video input device.

**Full Versions**  
SDK Version: 1.9.8  
SDK Type: Video SDK for Web  
Mobile Device: Android  
Android Version: 10  
Browser: Google Chrome  
Chrome Version: 120.0.6099.43

**How To Reproduce**

1. join meeting with VideoSDK.createClient().join()
2. check if isRenderSelfViewWithVideoElement() and call stream.startVideo() on either video element or canvas depending on the function check
3. start audio with stream.startAudio()
4. get the message in console (sometimes, sometimes it works correctly)

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [December 14, 2023, 2:11pm UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/2 "2023-12-14T14:11:35Z")

</div>

Hey @devs2

Thanks for your feedback.

Can you describe what happens when this log appears?

This is a status log we print to the console and it doesn’t affect video rendering.

When the video stream arrives before the video handler is ready, we output this log. But don’t worry, we handle this situation with proper error handling.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![devs2](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/devs2/32/44406_2.png) [@devs2](https://devforum.zoom.us/u/devs2)\
**Post date:** [December 14, 2023, 2:34pm UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/3 "2023-12-14T14:34:22Z")

</div>

Hi @vic.yang thanks for the reply.

When we see this message in the log nothing happens after. The message repeats over and over. No video output starts at all, either self-camera or remote participant.

---

<div class="post-metadata">

**Author:** ![Prze](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prze/32/53130_2.png) [@Prze](https://devforum.zoom.us/u/Prze)\
**Post date:** [April 18, 2024, 8:45am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/4 "2024-04-18T08:45:04Z")

</div>

Hey, @vic.yang  
I have same error.  
On my localhost connection works fine. But on dev server I have same error  
`video handle is not ready!`  
On local and dev server there is same code.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [April 18, 2024, 8:57am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/5 "2024-04-18T08:57:49Z")

</div>

Hey @Prze

Could you share the session ID with us for troubleshooting purposes?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![Prze](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prze/32/53130_2.png) [@Prze](https://devforum.zoom.us/u/Prze)\
**Post date:** [April 18, 2024, 9:20am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/6 "2024-04-18T09:20:04Z")

</div>

@vic.yang  
sure `sessionId:"TS/7uYlsQtOhLmkdYEmQ4g=="`

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [April 18, 2024, 9:36am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/7 "2024-04-18T09:36:51Z")

</div>

Hey @Prze

After analyzing the logs, we found these errors:

> Refused to compile or instantiate WebAssembly module because ‘unsafe-eval’ is not an allowed source of script in the following Content Security Policy directive

It seems that the CSP policy on your site prevents the video from working. Could you refer to our documentation for details?

[Video SDK - web - Browser support](https://developers.zoom.us/docs/video-sdk/web/browser-support/#content-security-policy-header)

In short, you need to add the `wasm-unsafe-eval` or `unsafe-eval` rule to your CSP settings.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![Prze](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prze/32/53130_2.png) [@Prze](https://devforum.zoom.us/u/Prze)\
**Post date:** [April 18, 2024, 10:16am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/8 "2024-04-18T10:16:27Z")

</div>

Hey @vic.yang it worked thanks for help.  
Also i have trouble to enable share audio in screeen share.

i set up in htaccess

```auto
<IfModule mod_headers.c>
    Header set Referrer-Policy "origin-when-cross-origin"
    Header set X-Frame-Options "SAMEORIGIN"
    Header set Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://*.zoom.us https://zoom.us https://code.jquery.com https://cdnjs.cloudflare.com https://maxcdn.bootstrapcdn.com https://maps.googleapis.com https://www.google-analytics.com https://www.google.com https://www.gstatic.com https://www.googletagmanager.com; style-src 'self' 'unsafe-inline' https://maxcdn.bootstrapcdn.com https://stackpath.bootstrapcdn.com https://fonts.googleapis.com https://use.fontawesome.com"
    Header set Cross-Origin-Embedder-Policy "credentialless"
</IfModule>

```

I also init my share on btn click like so

```if
      zoomSession.startShareScreen(screenShareContentVideo).
        then().
        catch((error) => {
          stopScreenShareBtnsStates()
          console.warn(error)
        })
    

```

I write in same post since i read it might refer to same headers problem.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [April 18, 2024, 10:52am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/9 "2024-04-18T10:52:14Z")

</div>

Hey @Prze

I see you’ve set the `Cross-Origin-Embedder-Policy` . I assume you want to enable `SharedArrayBuffer` , but you’re missing the `Cross-Origin-Opener-Policy` setting, which needs to be set to ‘same-origin’ to enable `SharedArrayBuffer` .

Currently, the default shared audio solution requires `SharedArrayBuffer`.

There are two workarounds：

- Enable SharedArrayBuffer, you can refer to this documentation

- Set the `audio_compatible_mode` field in JWT payload. If the value is 1, there is no need to enable `SharedArrayBuffer` .  
[Video SDK - Authorize](https://developers.zoom.us/docs/video-sdk/auth/#payload)

From my perspective, I recommend the former one, which will benefit more in both audio and video performance.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![Prze](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prze/32/53130_2.png) [@Prze](https://devforum.zoom.us/u/Prze)\
**Post date:** [April 18, 2024, 1:06pm UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/10 "2024-04-18T13:06:33Z")

</div>

@vic.yang

After add  
Header set Cross-Origin-Embedder-Policy “require-corp”  
Header set Cross-Origin-Opener-Policy “same-origin”

we have error warning not sharing decode type and video is not showing.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [April 19, 2024, 1:19am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/11 "2024-04-19T01:19:21Z")

</div>

Hey @Prze

Could you share the session ID with us for troubleshooting purposes again after enabling SharedArrayBuffer ?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![Prze](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prze/32/53130_2.png) [@Prze](https://devforum.zoom.us/u/Prze)\
**Post date:** [April 19, 2024, 5:16am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/12 "2024-04-19T05:16:36Z")

</div>

@vic.yang  
sure `4ZQdRmAGTPSYfxBZ7vH1Tg==`

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [April 19, 2024, 6:21am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/13 "2024-04-19T06:21:42Z")

</div>

Hey @Prze

> not sharing decode type

This log is just a debugging message; you can ignore it. It doesn’t have any impact on functionality.

> 4ZQdRmAGTPSYfxBZ7vH1Tg==

I checked the log, did the users in the session start their video?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![Prze](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prze/32/53130_2.png) [@Prze](https://devforum.zoom.us/u/Prze)\
**Post date:** [April 19, 2024, 6:31am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/14 "2024-04-19T06:31:44Z")

</div>

@vic.yang  
The problem is that when I add

```auto
    Header set Cross-Origin-Embedder-Policy "require-corp"
    Header set Cross-Origin-Opener-Policy "same-origin"

```

`typeof SharedArrayBuffer === 'function';` is `true` so i can share audio.  
But i have error and dont see video

session `4ZQdRmAGTPSYfxBZ7vH1Tg==` with headers no video can share audio

session `0xCBNTC0R1GCluZvZBlysA==` i remove headers i can see video.

so remains

```auto
Header set Referrer-Policy "origin-when-cross-origin"
    Header set X-Frame-Options "SAMEORIGIN"
    Header set Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://*.zoom.us https://zoom.us https://code.jquery.com https://cdnjs.cloudflare.com https://maxcdn.bootstrapcdn.com https://maps.googleapis.com https://www.google-analytics.com https://www.google.com https://www.gstatic.com https://www.googletagmanager.com; style-src 'self' 'unsafe-inline' https://maxcdn.bootstrapcdn.com https://stackpath.bootstrapcdn.com https://fonts.googleapis.com https://use.fontawesome.com"

```

This is so confusing

---

<div class="post-metadata">

**Author:** ![Prze](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prze/32/53130_2.png) [@Prze](https://devforum.zoom.us/u/Prze)\
**Post date:** [April 19, 2024, 8:12am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/15 "2024-04-19T08:12:25Z")

</div>

@vic.yang

I thin problem is in audio.  
I found work around.

When i start create self camera  
i use code

```auto
let userVideo = await zoomSession.attachVideo(zoomVideo.getCurrentUserInfo().userId, RESOLUTION)

document.querySelector('video-player-container').appendChild(userVideo)

```

However that was problem when I want to share buffer.  
So for self camera i create separate buffer using:

```auto
  const constraints = {
    audio: false,
    video: { width: 1280, height: 720 },
  }
  navigator.mediaDevices.getUserMedia(constraints).then((mediaStream) => {
    const video = document.getElementById('selfPrev')
    video.srcObject = mediaStream
    video.onloadedmetadata = () => {
      video.play()
    }
  }).catch((err) => {
    // always check for errors at the end.
    console.error(`${err.name}: ${err.message}`)
  })

```

code from mozilla doc. So i crate two streams one for self prev and the other for send to other person.

This solution work for me. If that should be improve please let me know or i think its solved.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [April 19, 2024, 8:39am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/16 "2024-04-19T08:39:35Z")

</div>

Hey @Prze

Thank you for sharing the code snippet related to this issue.

This might be a known limitation where the `video-player` element returned by `stream.attachVideo` does not have an initial width and height. I suggest you add a class to this element and define the styles within this class.

```css
.video-cell {
    aspect-ratio: 16/9;
    width: 300px;
}

```

```javascript
let userVideo = await zoomSession.attachVideo(zoomVideo.getCurrentUserInfo().userId, RESOLUTION)
userVideo.classList.add('video-cell');

```

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![Prze](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prze/32/53130_2.png) [@Prze](https://devforum.zoom.us/u/Prze)\
**Post date:** [April 19, 2024, 9:26am UTC](https://devforum.zoom.us/t/video-handle-is-not-ready/100021/17 "2024-04-19T09:26:31Z")

</div>

@vic.yang  
Yes it worked. Consider add more readable place in doc(or maybe I miss it). I have that snipped in my css. However as for tag and might not (do not why) apply to fresh new added element.  
After dynamic change works fine.  
Thanks for help
