# Display active speaker in video-player

**URL:** <https://devforum.zoom.us/t/display-active-speaker-in-video-player/135769>\
**Category:** Web\
**Created:** [July 29, 2025, 5:08am UTC](https://devforum.zoom.us/t/display-active-speaker-in-video-player/135769 "2025-07-29T05:08:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nventurino](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nventurino/32/39339_2.png) [@nventurino](https://devforum.zoom.us/u/nventurino)\
**Post date:** [July 29, 2025, 5:08am UTC](https://devforum.zoom.us/t/display-active-speaker-in-video-player/135769/1 "2025-07-29T05:08:59Z")

</div>

My goal is to have a video-player element that is always showing the active speaker.

Is it possible to re-use the same element with detachVideo/attachVideo in the same way that [video-single.tsx](https://github.com/zoom/videosdk-web-sample/blob/master/src/feature/video/video-single.tsx) works from the sample app?

I’m struggling to make this happen. I’m wondering if there is a working or tested pattern I can follow.  
Thanks!

---

<div class="post-metadata">

**Author:** ![nventurino](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nventurino/32/39339_2.png) [@nventurino](https://devforum.zoom.us/u/nventurino)\
**Post date:** [July 29, 2025, 9:23pm UTC](https://devforum.zoom.us/t/display-active-speaker-in-video-player/135769/2 "2025-07-29T21:23:18Z")

</div>

Got it working.

```auto
// Detach current users video from existing element
await mediaStream.detachVideo(parseInt(currentUserId), existingVideoPlayer);

// Attach new users video to THE SAME element
const videoElement = await mediaStream.attachVideo(
  stableActiveSpeakerId,
  VideoQuality.Video_1080P,
  existingVideoPlayer as HTMLElement // ← Reusing same container
);

```

---

<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 29, 2026, 9:23pm UTC](https://devforum.zoom.us/t/display-active-speaker-in-video-player/135769/3 "2026-07-29T21:23:40Z")

</div>

Closed on July 29, 2026, 9:23pm UTC

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