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

前端 未结 2 1770
慢半拍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条回答
  • 2020-12-19 05:04

    You only need copy the from Youtube Embed section (click on SHARE below the video and then EMBED and copy the entire iframe). You can't add the youtube link directly from url

    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题