Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiding the self video view #38

Open
Richard-Collins opened this issue Oct 29, 2024 · 2 comments
Open

Hiding the self video view #38

Richard-Collins opened this issue Oct 29, 2024 · 2 comments

Comments

@Richard-Collins
Copy link

First, I would like to thank you for making the integration easy. It's nice when a company puts in the effort to make their SDKs work. :)

I am trying to hide the self view video feed. Our use case requires a version minimal video conference system with as few buttons as the users often don't have very good IT skills. All they need is a video chat and a button to end it. My apologies if I missed how to do this in the documentation but I just could not find an option for disabling the self view video. The only way I have been able to do what I want is to wait till the session has been joined and then search for the .self-view element "document.querySelector('.self-view')" and set it to hidden. This works but feels like a hack that could fail at a later date. I am also trying to scale down the size of the main video feed, it looks like I may have to do a similar hack.

Thank you for your time and help,
Richard.

@tommygaessler
Copy link
Member

Hey @Richard-Collins , happy to hear you like the UI Toolkit!

Thank you for the suggestion, currently we do not have an option to hide the self view video, but we will add that to our roadmap!

Best,
Tommy

@Richard-Collins
Copy link
Author

Richard-Collins commented Nov 1, 2024

Thanks for your reply. I was able to scale the video feed without needing any hack, using a style with position set to fixed did the trick. I have included my 'hack' to hide the self view video stream here for anyone else that may need it. I do it on the session joined call back. To make it work I had to delay it's execution by 100ms. It's not a pretty solution but works.

onSessionJoined()
{
  console.log("Session joined");
  // Hack to hide the self video.
  setTimeout(()=>{
    let selfVideo = document.querySelector('.self-view');
    selfVideo.hidden = true;
  },100);
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants