我们如何从 youtube 播放器 api 中获得寻道时间? [英] How can we get seek time from youtube player api?

查看:16
本文介绍了我们如何从 youtube 播放器 api 中获得寻道时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我们如何才能暂停、播放以及达到多少用户从 youtube 播放器 api 中看到的视频数据?是否可以获得这些详细信息?

I'm wondering how can we get pause,play and upto how much user seen the video data from the youtube player api ?Is this possible to get those details ?

推荐答案

获取当前时间:getCurrentTimeMillis()

将视频移动到指定的时间:seekToMillis(int milliSeconds)

For moving the video to the time indicated: seekToMillis(int milliSeconds)

播放选定的视频:play()

暂停视频:pause()

获取信息也许最好的选择是使用 JSON

And to get info maybe the best option would be use JSON

这篇关于我们如何从 youtube 播放器 api 中获得寻道时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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