Is it possible to set the speaker view to myself in javascript via external meet api?

Hi,

I have created a conference where 1 person is live on video and audio (the presenter), and the rest of the participants are muted (the viewers). This is so the person who is live can stream their video to the others.

Everything works except for one thing. I would like the presenter to see their own video instead of an icon for another random participant. This can be done manually (i.e., the presenter selects their own video); but I would like to be able to force this behavior from javascript.

I have tried 2 ways to do this, and would welcome feedback on either:

  1. Get the dominant speaker id (which I can get, and is the correct id). Then somehow call the API to show that participant (i.e., the speaker) on the speaker’s video feed. * Is there an API call to change the speaker view?

  2. (This is MacGyver Klugey, but it almost works). I create 2 calls to the API (separate objects). One that goes into a hidden div (that has the camera and microphone live), and the other that goes in the visible div that shows the correct video feed, etc.

#2 almost works - the video part works great, but I get an echo in the audio on the presenter’s browser (since both of the windows create sound and feedback).

If there is a way to mute the sound on both of these, then this approach would work; but I haven’t found any way to successfully mute the sound on the iframes.

Any idea on how to implement either of these? Thanks! -Jeff

2 Likes