HTML 5音频当前位置 [英] HTML 5 Audio Current Position

查看:74
本文介绍了HTML 5音频当前位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将HTML 5与DOM一起使用是否有办法获取用户播放音频文件的当前位置,以及稍后返回该位置?

Using HTML 5 together with the DOM is there a way to get the current location that the user is in playing an audio file and also later on go back to that position?

推荐答案

参见 HTMLMediaElement 界面。 element.currentTime 应该可以为您提供所需的信息。

See the HTMLMediaElement interface. element.currentTime should give you what you're looking for.

这篇关于HTML 5音频当前位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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