MegaGlest Forum

MegaGlest => Forum discussion => Topic started by: ElimiNator on 3 May 2013, 01:18:56

Title: Video/YouTube embeding problem
Post by: ElimiNator on 3 May 2013, 01:18:56
Video/YouTube problem, embedded videos don't show properly.

Here is an example:

http://www.youtube.com/watch?v=Sh7IjiUillI
Title: Re: Video/YouTube embeding problem
Post by: Omega on 3 May 2013, 01:37:02
This is quite strange. They were working previously, and the rendered HTML code works fine off-site. Tom, Titi, and Softcoder, has anything changed server side recently?
Title: Re: Video/YouTube embeding problem
Post by: GunChleoc on 3 May 2013, 08:47:54
It works fine for me on Firefox/Windows. Maybe your browser doesn't like the code?
Title: Re: Video/YouTube embeding problem
Post by: Omega on 3 May 2013, 09:19:37
It works fine for me on Firefox/Windows. Maybe your browser doesn't like the code?
I notice that it's working for Firefox, as well. However, Chrome isn't displaying the video properly. Taking the snippet of code used to display the video and putting it into a new HTML file displays properly in Chrome.
Title: Re: Video/YouTube embeding problem
Post by: tomreyn on 4 May 2013, 00:51:03
That's due to the Content Security Policy I adopted for this site. For a reason I'm failing to understand, Chromium considers "www.youtube.com (http://www.youtube.com)" to not match the hostname contained in the following URL: "http://www.youtube.com/v/Sh7IjiUillI&rel=1&fs=1 (http://www.youtube.com/v/Sh7IjiUillI&rel=1&fs=1)". I'm trying to get more information on why the Chromium implementation considers this to be a mismatch. If it turns out this can't be fixed I'll loosen those restrictions. In the meantime please use plain HTTP links.
Thanks.

Update:
So I played wit this for a while, trying various ways to work around this restriction. But it turns out the only serious solution is to make the plugin which adds those Youtube embeds to reference the source over httpS and not just http IF the page embedding it uses this scheme. Omega: Do you think you could add this?
Title: Re: Video/YouTube embeding problem
Post by: Omega on 4 May 2013, 01:40:00
Test post:


EDIT: Problem appears to be related to the use of HTTP instead of HTTPS. I'll convert the youtube mod to use HTTPS instead, after I finish what I'm currently working on.