OriginalEXE / vidim

Background videos made easy. Supports both YouTube and self hosted videos.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YouTube 'origin' player parameter

opened this issue · comments

origin: window.location.host,

Although not mentioned in the player parameters documentation (https://developers.google.com/youtube/player_parameters#origin), after reading the documention on the IFrame Player API (https://developers.google.com/youtube/iframe_api_reference), it looks like the origin parameter should include the protocol and port also:

origin: typeof window.location.origin !== 'undefined' ? window.location.origin : window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: ''),

https://developer.mozilla.org/en-US/docs/Web/API/Location/origin says location.origin is not supported in IE/Safari/Opera, however it seems to work in IE11 and Edge from limited testing - the above snippet includes a fallback just in case.

Thank you for reporting this, I will fix it today.

Fixed in 1.0.2, thanks for your help!