AJAX and YouTube: 'X-Frame-Options' to 'SAMEORIGIN'.

前端 未结 2 1786
慢半拍i
慢半拍i 2020-12-19 04:45

I\'m writing a site where content is loaded dynamically via jQuery. The reason for this is to leave an audio player running while being able to navigate through page conten

2条回答
  •  梦毁少年i
    2020-12-19 05:29

    The error means that the document may only be used as iframe inside documents located at www.youtube.com

    Use the URL of the embed-code instead:

    http://www.youtube.com/embed/myvideo
    

    it will send a X-Frame-Options-header with a value of ALLOWALL

提交回复
热议问题