在phonegap上播放youtube视频
我正在使用phonegap开发一个应用程序,其中视频部分显示使用youtube jsonc api检索的youtube视频列表。我希望单击链接时在应用程序内播放视频,以便在关闭视频时再次显示我的应用程序界面。 YouTube api 提供了视频的 rstp:// 和 http:// 链接,但我无法在应用程序内播放视频。一旦可行,我也想将其移植到黑莓和其他设备上,因此高度首选特定于phonegap的解决方案。
I am developing an application using phonegap in which a video section shows list of youtube videos retrieved using youtube jsonc api. I would like the video to be played inside the application when its link is clicked, so that when the video is closed, my application interface is shown again. Youtube apis give rstp:// and http:// links for the videos, but I haven't been able to play the videos inside the application. Once that works, I would like to port it over to blackberry and other devices too, so a phonegap specific solution is highly preferred.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我们为 iPhone 开发的一个客户端项目中,我们必须获取 YouTube 链接并将其更改为
标记。其实现方式如下:
iOS PhoneGap 很好地处理了这个问题。对于 Android,只需打开 http:// YouTube 链接就足以让 Android 操作系统识别它并将用户转移到本机 YouTube 应用程序。
对于黑莓……天啊,我不知道。有件事告诉我,这不会太有效。请原谅我,我是一名疲惫不堪的黑莓开发者,承受着太多黑莓带来的伤痕。
祝你好运!
On a client project that we've worked on, for iPhone, we had to take the YouTube link and change it over to an
<embed>
tag. Here is how it's done:iOS PhoneGap handles this pretty well. For Android, simply opening up an http:// YouTube link should be enough for the Android OS to recognize it and divert the user to the native YouTube application.
For BlackBerry... o geez, I don't know. Something tells me it wouldn't work too well. Forgive me, I am a jaded BlackBerry developer bearing too many BlackBerry-induced scars.
Good luck!