I am writing an HTML-only app and want to embed a YouTube IFRAME-based player. I used the demo code from https://developers.google.com/youtube/iframe_api_reference unfortunately, this does not seem to work out-of-the-box for HTML files loaded via the file:// protocol. I get the following error:
www-widgetapi.js:100
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null').
I found Failed to execute 'postMessage' on 'DOMWindow': https://www.youtube.com !== http://localhost:9000 unfortunately it didn't help: whether I include it using their JS file via http or https doesn't matter.