使用jwplayer获取当前的播放时间(use jwplayer to get current play time)

编程入门 行业动态 更新时间:2024-10-18 20:30:43
使用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();

更多推荐

本文发布于:2023-08-04 12:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1416045.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:播放时间   jwplayer   current   time   play

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!