【问题标题】:How to embed youtube playlist collection in an iframe如何在 iframe 中嵌入 youtube 播放列表集合
【发布时间】:2015-09-01 10:41:07
【问题描述】:

我有一个要求,我必须从 url(在 html 网页中)显示 youtube 播放列表集合。

例如 url(有 2 个播放列表):

https://www.youtube.com/user/vikaskottari/playlists

当我在 iframe 中使用此 url 时,它会显示一个空白屏幕,并出现控制台错误:

Refused to display 'https://www.youtube.com/user/vikaskottari/playlists' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

知道如何实现这一点。

【问题讨论】:

  • 你解决了吗?

标签: iframe youtube youtube-iframe-api


【解决方案1】:

改用这个脚本

https://www.youtube.com/embed/VIDEO_ID?playlist=aaaaaa,bbbbb,cccccc 其中 aaaaa, bbbbb,ccccc 是 youtube 视频的 id。

或者这个 https://www.youtube.com/embed/?listType=playlist&list=yyyyyy

yyyyyy 是 youtube 播放列表的 ID 问候

【讨论】:

    猜你喜欢
    • 2012-10-22
    • 2013-09-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-12
    • 1970-01-01
    • 2018-06-29
    • 1970-01-01
    相关资源
    最近更新 更多