使用jwplayer获取当前的播放时间(use jwplayer to get current play time)
我正在使用jwplayer播放嵌入式视频, javascript api告诉我
jwplayer("mediaplayer").getPosition()
将获得当前位置,但我的结果是undefined
任何人都可以帮助我获得正确的弹性
I am using jwplayer to play embedded video, the javascript api tells me
jwplayer("mediaplayer").getPosition()
will get the current position, but my result is undefined
Can anyone help me get the correct resilts
最满意答案
对我来说工作正常,只是文档指定:
<div id="container"></div> jwplayer("container").setup({ file: "http://content.bitsontherun.com/videos/nPripu9l-60830.mp4", flashplayer: "http://player.longtailvideo.com/player.swf", image: "http://content.bitsontherun.com/thumbs/nPripu9l-480.jpg", height: 270, width: 480 }); var state = jwplayer("container").getState(); var elapsed = jwplayer("container").getPosition();Works fine for me just how the documentation specifies :
<div id="container"></div> jwplayer("container").setup({ file: "http://content.bitsontherun.com/videos/nPripu9l-60830.mp4", flashplayer: "http://player.longtailvideo.com/player.swf", image: "http://content.bitsontherun.com/thumbs/nPripu9l-480.jpg", height: 270, width: 480 }); var state = jwplayer("container").getState(); var elapsed = jwplayer("container").getPosition();更多推荐
发布评论