# Active speaker canvas issue

**URL:** <https://devforum.zoom.us/t/active-speaker-canvas-issue/90467>\
**Category:** Web\
**Created:** [June 20, 2023, 9:05am UTC](https://devforum.zoom.us/t/active-speaker-canvas-issue/90467 "2023-06-20T09:05:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uyaniksigma](https://avatars.discourse-cdn.com/v4/letter/u/bb73d2/32.png) [@uyaniksigma](https://devforum.zoom.us/u/uyaniksigma)\
**Post date:** [June 20, 2023, 9:05am UTC](https://devforum.zoom.us/t/active-speaker-canvas-issue/90467/1 "2023-06-20T09:05:21Z")

</div>

I’m running a problem, i try to show video of active speaker it works but when I stop previous speaker’s video and start rendering current user canvas becomes empty for half second or so. Is there any solution to render next speaker’s video without gap between two video views?

```auto
client.on('active-speaker', async (payload) => {
    let userId = payload[0].userId
    if (userIdRef.current != userId && talkingRef.current != userId){
        if(client.getAllUser().filter((user) => { return user.userId === payload[0].userId })[0].bVideoOn) {
            let acrossVideoCanvas = document.querySelector('#videoFrameAcross')
            await mediaStreamRef.current?.stopRenderVideo(acrossVideoCanvas, talkingRef.current)
            mediaStreamRef.current?.clearVideoCanvas(acrossVideoCanvas)
            await mediaStreamRef.current.renderVideo(acrossVideoCanvas, userId, 1280, 720, 0, 0, 2)
            talkingRef.current = userId
        }
    }
})

```

I try to render video on an existing canvas without stopRenderVideo then I get “INVALID\_OPERATION” error with message “subscribe video counts greater than maximum size (1)”

---

<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:** [June 20, 2023, 10:31am UTC](https://devforum.zoom.us/t/active-speaker-canvas-issue/90467/2 "2023-06-20T10:31:08Z")

</div>

Hey @uyaniksigma

Thanks for your feedback.

Have you enabled `SharedArrayBuffer` on your site?

We will improve the user experience for the scenario in the future release.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![uyaniksigma](https://avatars.discourse-cdn.com/v4/letter/u/bb73d2/32.png) [@uyaniksigma](https://devforum.zoom.us/u/uyaniksigma)\
**Post date:** [June 20, 2023, 1:29pm UTC](https://devforum.zoom.us/t/active-speaker-canvas-issue/90467/3 "2023-06-20T13:29:35Z")

</div>

> [@vic.yang](#):
>
> SharedArrayBuffer

Even if i enable “SharedArrayBuffer” on my website, will it work on every browser?

---

<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:** [July 20, 2023, 11:29pm UTC](https://devforum.zoom.us/t/active-speaker-canvas-issue/90467/4 "2023-07-20T23:29:44Z")

</div>

Closed on July 20, 2023, 11:29pm UTC

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