o嵌入移动设备
我刚刚发现了 oEmbed,想知道是否有办法通过发送用户代理(或首选格式,如 3gp)来获取移动链接/嵌入代码?
我可能错过了一些东西,但我在 oEmbed 网站上找不到这些选项。
例如(Youtube),我想获取支持该设备的 3gp rtsp 链接,并获取支持该设备的 flash 嵌入。
我知道 youtube 上存在这些链接,因为当我用手机访问 www.youtube.com 时,我会得到 rtsp 的链接。
谢谢。
I've just found out about oEmbed and was wondering if there is a way to get a mobile link/embed code by sending the user-agent (or preferred format, like 3gp)?
I've might have missed something, but I can't find those options on the oEmbed website.
For example (Youtube), I would like to get the 3gp rtsp link for devices that supports that and flash embed for devices that supports that.
I know those links exists on youtube, because when I go to www.youtube.com with my mobile phone i get links to rtsp.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,对于您的用例来说,oembed 规范没有提及在给定 URL 上请求不同格式的内容,因此完全由每个提供商决定是否使用不同格式的内容。他们希望如何在响应中支持移动设备友好的嵌入代码。
例如,您可以将 iframe 参数传递到 YouTube oembed 端点,以获取其嵌入代码的 Flash 或 iframe 版本。但是,我认为没有很多其他提供商支持这种类型的标志。
Unfortunately for your use case, the oembed spec doesn't make any mention of requesting different formats of the content at a given URL, so it's completely up to each provider to decide if & how they want to support mobile-friendly embed code in their responses.
For example, you can pass an iframe parameter to the YouTube oembed endpoint to either the Flash or the iframe version of their embed code. However, I don't think many other providers support this type of flag.