Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

176
Visualizações
How to reset a website media permissions from a chrome extension

I'm working on developing a chrome extension that adds the ability to users to stream videos from any website they want by using Agora SKD. What the extension supposed to do is showing the streaming video screen inside the opened tab. I'm using Agora library to stream the videos.

Agora library requests media permissions(camera and microphone) for the opened website; If the user was on w3schools.com website, then media permissions will be granted to w3schools.com website.

enter image description here

Granting media permission to every website I need to inject my javascript code in and start video streaming on is not something very wise, because those websites can run scripts in the future that will access user's camera and microphone. That's why I'm looking for a way to limit websites access to those permissions.

The first way I thought in to show the video stream inside the tab without granting w3schools website media permission is embedding the video stream code in another website owned by my chrome extension mywebsite.com, grant my website the media permission and display my website within w3schools.com. I tried to put my website mywebsite.com inside a frame within w3schools.com website and ask for permission from my website. This doesn't work cause Chrome grants the permission to w3schools.com website and passed the permission to the frame that running my website.

<!--Allow camera and microphone access within the context of this iframe-->
<iframe src="https://mywebsite.com" allow="camera;microphone"></iframe>
<!--Other content of w3schools.com goes here-->

I tried to also look for a way to grant w3schools.com website media permissions temporarily and revoke the permissions after the video streaming is over but I couldn't find any way to do that.

I didn't find any way to revoke/reset the permissions using JS.
I didn't find any way to revoke/reset the permissions using chrome extension api interface. I didn't find anyway to temporarily grant the media permission to a tab(until it's closed or for a certain time). I didn't find anyway to access chrome://settings/content/siteDetails?site=https%3A%2F%2Fwww.w3schools.com and change the website permission from there.

So my questions are:

  • How can I revoke the media permissions access for a website using chrome extensions?
  • Is there a way where I can load my website https://mywebsite.com within w3schools.com and request the media permissions to https://mywebsite.com instead of w3schools.com?
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda