Is there a way to access/listen to the previous/next buttons in the iOS HTML5 video player? Ideally I would listen to some sort of a prev and next event and swap out the videos accordingly without the user having to close the video and click my prev/next buttons.
有没有办法访问/收听iOS HTML5视频播放器中的上一个/下一个按钮?理想情况下,我会听一些上一个和下一个事件并相应地交换视频,而无需用户关闭视频并单击我的上一个/下一个按钮。
iOS video player http://www.iphonefaq.org/images/archives/vimeo-html5.jpg
iOS视频播放器http://www.iphonefaq.org/images/archives/vimeo-html5.jpg
I am currently using jwplayer to generate the html5 video and listening to their playlist next/prev listeners don't seem to do the trick. I can always find and attach listeners to the actual <video>
tag pretty easily though.
我目前正在使用jwplayer来生成html5视频,然后听他们的播放列表/ prev听众似乎没有做到这一点。我总能很容易地找到并将听众附加到实际的
3 个解决方案
#1
2
If you attach listeners to the video tag itself then when the user hits next and previous then the listeners in the code will put up on those buttons. I am doing something similar with youTube videos. If you hit next it goes to the end of the youtube video and fires a video complete event tag and then I load the next video when that is called, so that the video will one loop without the next button and two the users can hit the buttons. I have not found a way to monitor the buttons in the player on the iphone side, but if I find it I will post that as well since it is important to know both angels if possible.
如果您将监听器附加到视频标签本身,那么当用户点击下一个和之前的那个时,代码中的监听器将会放在这些按钮上。我正在做与youTube视频类似的事情。如果您点击下一步它会转到youtube视频的末尾并触发视频完整事件标记,然后在调用该视频时加载下一个视频,以便视频将在没有下一个按钮的情况下循环播放两个用户可以点击纽扣。我还没有找到一种方法来监控iphone侧播放器中的按钮,但是如果我发现它,我也会发布它,因为如果可能的话,知道两个天使是很重要的。
Funny thing I think I am looking to try and do the same exact thing. I know how to transition the videos to the next without having to leave the fullscreen mode because of using youTube api in the js but I am not able to observe the quicktime player itself and need to for another feature that I would like to work on.
有趣的事情我想我想尝试做同样的事情。我知道如何将视频转换到下一个而不必离开全屏模式,因为在js中使用youTube api但是我无法观察quicktime播放器本身并且需要我想要处理的另一个功能。
#2
1
That's the native iOS player which is a thin version of Quicktime. You'll know if it's an HTML5 player when it doesn't transition from the Quicktime player and your page in Safari. How is your movie being embedded?
这是原生的iOS播放器,它是Quicktime的瘦版本。当它没有从Quicktime播放器和Safari中的页面转换时,你会知道它是否是一个HTML5播放器。你的电影是如何嵌入的?
#3
0
I recently had a similar problem and was unable to find a solution using the HTML player. I ended up implementing the video player using MPVideoPlayer Framework and launching it from my web view with a custom URL scheme (AppName:Commnad:Asset). I was then able to use the delegate methods to monitor user interactions. If you would like to see basic implementation, let me know and I can add some code.
我最近遇到了类似的问题,无法使用HTML播放器找到解决方案。我最终使用MPVideoPlayer Framework实现了视频播放器,并使用自定义URL方案(AppName:Commnad:Asset)从我的Web视图启动它。然后我能够使用委托方法来监视用户交互。如果您想查看基本实现,请告诉我,我可以添加一些代码。
#1
2
If you attach listeners to the video tag itself then when the user hits next and previous then the listeners in the code will put up on those buttons. I am doing something similar with youTube videos. If you hit next it goes to the end of the youtube video and fires a video complete event tag and then I load the next video when that is called, so that the video will one loop without the next button and two the users can hit the buttons. I have not found a way to monitor the buttons in the player on the iphone side, but if I find it I will post that as well since it is important to know both angels if possible.
如果您将监听器附加到视频标签本身,那么当用户点击下一个和之前的那个时,代码中的监听器将会放在这些按钮上。我正在做与youTube视频类似的事情。如果您点击下一步它会转到youtube视频的末尾并触发视频完整事件标记,然后在调用该视频时加载下一个视频,以便视频将在没有下一个按钮的情况下循环播放两个用户可以点击纽扣。我还没有找到一种方法来监控iphone侧播放器中的按钮,但是如果我发现它,我也会发布它,因为如果可能的话,知道两个天使是很重要的。
Funny thing I think I am looking to try and do the same exact thing. I know how to transition the videos to the next without having to leave the fullscreen mode because of using youTube api in the js but I am not able to observe the quicktime player itself and need to for another feature that I would like to work on.
有趣的事情我想我想尝试做同样的事情。我知道如何将视频转换到下一个而不必离开全屏模式,因为在js中使用youTube api但是我无法观察quicktime播放器本身并且需要我想要处理的另一个功能。
#2
1
That's the native iOS player which is a thin version of Quicktime. You'll know if it's an HTML5 player when it doesn't transition from the Quicktime player and your page in Safari. How is your movie being embedded?
这是原生的iOS播放器,它是Quicktime的瘦版本。当它没有从Quicktime播放器和Safari中的页面转换时,你会知道它是否是一个HTML5播放器。你的电影是如何嵌入的?
#3
0
I recently had a similar problem and was unable to find a solution using the HTML player. I ended up implementing the video player using MPVideoPlayer Framework and launching it from my web view with a custom URL scheme (AppName:Commnad:Asset). I was then able to use the delegate methods to monitor user interactions. If you would like to see basic implementation, let me know and I can add some code.
我最近遇到了类似的问题,无法使用HTML播放器找到解决方案。我最终使用MPVideoPlayer Framework实现了视频播放器,并使用自定义URL方案(AppName:Commnad:Asset)从我的Web视图启动它。然后我能够使用委托方法来监视用户交互。如果您想查看基本实现,请告诉我,我可以添加一些代码。