Failed to execute 'postMessage' on 'DOMWindow': target/origin mismatch http vs https

前端 未结 4 563
野的像风
野的像风 2020-12-06 07:54

I apologize up front as I\'m very confused by my problem. I\'m really in a bind because this is causing a problem on my production site.

I have a javascript player o

4条回答
  •  感动是毒
    2020-12-06 08:55

    My solution is to write all the Youtube player logic in a separate page (as blank as posible) , and that page be referenced in an IFRAME tag.

    
    

    Then, your youtube_frame.html will be something like this:

    
    
      
        
        

    (As a marginal note: my context is that Prototype.js interferes with the event 'OnStateChange', and we cannot remove this dependency. Using a jsfiddle would not be useful to reproduce the issue, as it has few dependencies. My app here is built in Rails, and using this plugin for showing a Video playlist: https://github.com/Giorgio003/Youtube-TV/)

提交回复
热议问题