Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#101 2022-01-08 12:53:22

DarkZero
Member
From: France
Registered: 2015-03-11
Posts: 24

Re: [MOD] Media.js 2.4.0

Hello Visman,

Some YouTube videos are blocked when the header Referrer-Policy is set to no referrer mode. If the video is not loaded from a known public domain, the video will not be loaded. This is not the case with all videos. In short, the temporary solution is to send the referer (globally on the whole forum).

On the official doc, it looks like you can send the domain specifically for YouTube.
Could you help me to integrate this in media.js?

https://developers.google.com/youtube/p … ters?hl=en

<iframe id="ytplayer" type="text/html" width="640" height="360"
  src="https://www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&origin=http://example.com"
  frameborder="0"></iframe>

The part :

&origin=http://example.com

Thanks

Offline

#102 2022-01-08 16:14:17

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,527
Website

Re: [MOD] Media.js 2.4.0

Hmm, I didn't see any change for using the origin parameter.

Test https://jsfiddle.net/poppin3000/m12j3wub/
The first video does not displayed and there is one message in the console about mixed content.
The second video is displayed anyway (no origin, there is origin https or http). There are no messages in the console.
I'm using Firefox.

P.S. In general, I did not understand what this parameter should protect from or what should it improve?

Offline

#103 2022-01-10 18:29:58

DarkZero
Member
From: France
Registered: 2015-03-11
Posts: 24

Re: [MOD] Media.js 2.4.0

Hello,

Indeed, it doesn't seem to change the loading of the page. I'm not sure what the problem is.

Try with this video: https://www.youtube.com/watch?v=rvynnzt8VG4

Offline

#104 2022-01-11 06:28:39

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,527
Website

Re: [MOD] Media.js 2.4.0

This video behaves similarly on my browser. If I try to embed it via http - it is blocked, if via https - there are no restrictions for it.
vid.png
I took a closer look at the documentation describing iframe parameters. The origin parameter makes sense only if enablejsapi=1, and I don't use such a parameter.

Offline

#105 2022-01-11 06:47:59

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,527
Website

Re: [MOD] Media.js 2.4.0

If your video is not displayed due to the absence of the origin parameter, then I can try adding its addition from the link posted by the user.
Then, to the problematic videos, you will need to add the origin parameters with the domain to the link yourself.

Or do you have a problem with all youtube videos?

Offline

#106 2022-01-11 19:33:00

DarkZero
Member
From: France
Registered: 2015-03-11
Posts: 24

Re: [MOD] Media.js 2.4.0

Unfortunately the origin tag does not change anything. Whether I add it or not, the video does not appear. It doesn't do it on all the videos, only some of them without me knowing why. Maybe the creator of the video when he posts it on YouTube must have some additional privacy settings. But on your forum there is no problem....

For example the following two videos, the behavior is different, yet the format is identical.

[media]https://www.youtube.com/watch?v=rvynnzt8VG4[/media]

[media]https://www.youtube.com/watch?v=t2pHXGm8aVM[/media]

image.num1641929560.of.world-lolo.com.png

What made me think that the origin tag would allow me to make the videos work is that when I deactivate a header, the video is displayed correctly.

The header in question : Referrer-Policy "same-origin"

Offline

#107 2022-01-12 03:16:14

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,527
Website

Re: [MOD] Media.js 2.4.0

https://support.google.com/youtube/answer/2453875
https://support.google.com/youtube/answer/6301625
https://support.google.com/youtube/thre … -url?hl=en

Actually found the issue here. The videos that were displaying this on embed had "Copyrighted" music playing in the background. YouTube apparently does not play videos like this while embedded. We had our user remove the audio and re-uploaded the video and everything is working fine now.

Hope this helps somebody.

https://wordpress.org/support/topic/emb … t-12405856

I think I figured out the cause (at least party).

All affected video’s have a “Copyright claim” tag within the YouTube Studio, because they use audio tracks that are owned by others.
...
One additional detail (I’m about 95% sure of this): the video’s usually play on Edge, Opera, Firefox, but not Chrome. This I can’t be sure off, I think I’ve had issues with every browser, and I can’t seem to reproduce this behavior currently.

My browser Firefox, DRM -off, Referrer policy: strict-origin-when-cross-origin

Offline

#108 2022-01-12 17:37:21

DarkZero
Member
From: France
Registered: 2015-03-11
Posts: 24

Re: [MOD] Media.js 2.4.0

Hello, Thanks for your research. Can you try with Referrer-Policy "same-origin"?
I think it's not related with your mod, so I'll try others things.

Thanks again for your help.

Offline

#109 2022-01-13 02:27:55

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,527
Website

Re: [MOD] Media.js 2.4.0

Can you try with Referrer-Policy "same-origin"?

Everything is broken...
yout.jpg

Offline

Board footer

Powered by FluxBB