The iframe tag cannot open the local camera


#1

If I use the jitsi in the iframe tag, I can load out the page, but I can’t open the local camera, failed to set up the track, failed to get the stream, what’s the problem?


#2

How are you loading it over http or https?


#3

loading it over https


#4

Are you using the iframe API or your own iframe? If it’s the latter, you need to add “allow=“camera; microphone;” to your iframe definition.


#5

yes…chrome has deprecated auto load feature for microphone and camera in its previous updates in 2018. In iframe tag src=" " allow=“geolocation; microphone; camera”. Valid values for allow include:

  • geolocation
  • microphone
  • camera
  • midi
  • encrypted-media

#6

I’m using the iframe API, adding allow and still can’t get video


#7

adding allow and still can’t get video


#8

have you tried opening in other browsers… Firefox n all?


#9

Firefox works, chrome doesn’t.


#10

In many scenarios, chrome doesn’t work with webrtc services. may be that can be an issue. are you able to run on chrome without iframe? Try https://test.webrtc.org


#11

can run on chrome without iframe


#12

plz share a screenshot by inspecting the page in console.


#13


#14

This error seems to be an SSL certification problem. Chrome restricts this if SSL doesn’t support and you need to be follow secure protocols by https:// . This is caused due to service workers and you can’t do anything because protocols doesn’t command a proper relay from iframe to original or you can say global working environment. You can just try by typing in URL chrome://flags and then in Advanced search for a section “Insecure origins treated as secure” and enable it. Try it and let me know.


#15

I see. Thanks for your reply


#16

Hi, today I saw a post related to your problem - https://stackoverflow.com/questions/41373166/why-am-i-seeing-error-only-secure-origins-are-allowed-for-my-service-worker & https://github.com/RocketChat/Rocket.Chat/issues/3561 . Now here you can understand what I wanted to say.