Blogger Atom/RSS 源中的 YouTube 视频
我正在尝试通过 Ruby on Rails 应用程序和 Safari 的提要阅读器查看我的博客帐户的提要。所有简单的 HTML(如段落和图像)都可以很好地解释,但嵌入 YouTube 视频不起作用。
例如,当我将其添加到博客中的帖子中时:
<p>Before</p>
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/9_tCtvmAm4M&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9_tCtvmAm4M&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>
这是使用 feed_tools gem 得出的:
<p>Before</p>
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/9_tCtvmAm4M&amp;hl=en_US&amp;fs=1&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9_tCtvmAm4M&amp;hl=en_US&amp;fs=1&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>
Safari 的提要阅读器简单地显示:
<p>Before</p>
... 这让我认为它无法解析作为 YouTube 视频接收的内容。
是否可以让 YouTube 视频在提要阅读器中正确显示?发生这种情况是因为嵌入式 Flash 不是正式有效的 HTML 吗?
I'm trying to view a feed from my blogger account both from a Ruby on Rails app, and Safari's feed reader. All of the simple HTML (like paragraphs and images) is interpreted just fine, but embedding a YouTube video isn't working.
For example, when I add this to my post inside of blogger:
<p>Before</p>
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/9_tCtvmAm4M&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9_tCtvmAm4M&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>
This comes out using the feed_tools gem:
<p>Before</p>
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/9_tCtvmAm4M&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9_tCtvmAm4M&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>
Safari's feed reader simply shows:
<p>Before</p>
... which makes me think that it can't parse what's being received as the youtube video.
Is it possible to get youtube videos to show up correctly in feed readers? Is this happening because the embedded flash isn't officially valid HTML?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,这有点奇怪,与其他 Flash 内容一样吗?您是否尝试过 YouTube 嵌入视频的新方式: http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html
Hmmm that's a bit weird, was it is like with other Flash content? Have you tried YouTube's new way of embedding videos: http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html
在你的帖子中尝试一下:
Try this in your post: