在iPhone应用中通知YouTube视频已完成 [英] Notification of YouTube video completion in iPhone app

查看:160
本文介绍了在iPhone应用中通知YouTube视频已完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照YouTube API博客的方法#2嵌入YouTube视频没有任何困难:

I've embedded the YouTube video with no difficulties following method #2 of the YouTube API Blog:

http://apiblog.youtube.com/2009/02/youtube-apis-iphone-cool-mobile -apps.html

有什么方法可以知道视频播放完毕的时间(或者当用户按下电影控制器上的完成按钮时)?

Is there any way to know when the video has finished playing (or when the user presses the Done button on the movie controller)?

例如,假设您想播放播放列表中的每个视频,而无需用户与应用互动。什么时候开始下一个视频有什么钩子?

For instance, say you wanted to play each video in a playlist without requiring the user to interact with the app. Is there any hook for when to start the next video?

推荐答案

恐怕你运气不好。我在六个月前搜索过同样的东西,得出的结论是当前的SDK无法实现。我也在堆栈溢出中发布了类似的问题。

I am afraid you are out of luck. I have searched for the same thing around six months before and came to the conclusion that it is not possible with the current SDK. I have posted a similar question in stack overflow too.

https://stackoverflow.com/questions/4011796/notification-after-video-playback-in-mobile-safar i

通常,如果您需要此类功能,则必须使用 MPMoviePlayerCOntroller ,而不是网页视图。即便如此,我认为这个类不支持youtube网址。

In general, if you need this kind of functionality, you have to use MPMoviePlayerCOntroller, not a web view.Even then, I don't think youtube URLs are supported by this class.

这篇关于在iPhone应用中通知YouTube视频已完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆