Shared Youtube video not playing in iFrame

I saw similar topics where recipients of shared videos get a frozen splash screen but the video doesn’t start. I’m having the same problem, but only when the recipient is in an iFrame in another page. Also, when the sender removes the video, the iFrame recipient still sees the Youtube thumbnail. Direct to Jitsi server and mobile work as expected. I reproduced the behavior on meet.jit.si as well as my own self-hosted platform. No pertinent errors in the Chrome console to work from. Any ideas?

1 Like

@jlightfoot you found solution ?

try master branch. I think they have fixed it in master.

1 Like
1 Like

Youtube sharing in iframes seems to have magically started working even without that fix. I just confirmed that on an older Jitsi install. Could it have been a Chrome bug patched over the last couple weeks or maybe an issue with Youtube itself?

1 Like

Thank you @damencho . How do I update?
I followed this guide. but no luck .

ii  jitsi-meet                            2.0.5390-3                        all          WebRTC JavaScript video conferences
ii  jitsi-meet-prosody                    1.0.4628-1                        all          Prosody configuration for Jitsi Meet
ii  jitsi-meet-tokens                     1.0.4628-1                        all          Prosody token authentication plugin for Jitsi Meet
ii  jitsi-meet-web                        1.0.4628-1                        all          WebRTC JavaScript video conferences
ii  jitsi-meet-web-config                 1.0.4628-1                        all          Configuration for web serving of Jitsi Meet
ii  jitsi-videobridge2                    2.1-416-g2f43d1b4-1               all          WebRTC compatible Selective Forwarding Unit (SFU)

echo 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org unstable/' | sudo tee /etc/apt/sources.list.d/jitsi-unstable.list > /dev/null
apt update
apt install jitsi-meet
1 Like

Thank you @damencho
Will this effect previous configuration?

Great. Its Fixed now.
I got one more issue. Live streaming failed to start. it is not working in the iframe

I fixed it. found solution from below post

You cannot display a lot of websites inside an iFrame. Reason being that they send an “X-Frame-Options: SAMEORIGIN” response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page.

I faced the same error when displaying YouTube links. For example: https://www.youtube.com/watch?v=8WkuChVeL0s

I replaced watch?v= with embed/ so the valid link will be: https://www.youtube.com/embed/8WkuChVeL0s

It works well. (Reason : /embed has the required header)

Try to apply the same rule on your case.

Why is X-Frame-Options

It is there for user security. Prevents clickjacking : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

The embed endpoint is desinged to be safer to show on external websites (not youtube.com).

SAMEORIGIN

The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain, although it is argued that the option is not very useful unless all ancestors are also in the same origin.