vue-youtube-embed 플러그인을 사용하여, youtube를 page에 삽입할 때, 다음과 같은 오류가 발생하였다.
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://localhost:4433').
youtube를 로그인하면 이러한 오류는 발생하지 않는다.
구글링 해보니, 다들 같은 고민을 하고 있는 듯 하였다.
I took a deeper look into this, it seems like it might be a timing issue with the YouTube IFrame API. The IFrame API already loads everything over https, so implementing #68 again would offer no benefits, and actually loses us the benefit of having the IFrame API do all of the lifting for creating the iframe. It looks like initially two messages are sent, the first one gets rejected due to the iframe not being initialized completely (it looks like): {"event":"listening","id":1,"channel":"widget"}. They have a try / catch in the YouTube API, but according to the HTML5 spec for postMessage, browsers should silently fail postMessages where the origins don't match up, meaning the catch block is never hit. Unfortunately, it looks like there's no suitable way for us to fix this without Google doing something on their end to fix the postMessage timing.
번역 : 불행히도, Google이 postMessage 타이밍을 수정하기 위해 무언가를하지 않으면이 문제를 해결할 수있는 적절한 방법이없는 것처럼 보입니다.
원본 : https://github.com/videojs/videojs-youtube/issues/67
그렇다고 한다^^;
더 찾아봐야지..