简体   繁体   English

IOS中的HTML5音频currentTime

[英]HTML5 Audio currentTime in IOS

i want to play a sound, and in some cases i am changing the current time, but it is not working fine rarely times in IOS (it starts from zero sec or continue when i change the current time!) 我想播放声音,在某些情况下,我正在更改当前时间,但是在IOS中很少能正常工作(它从零秒开始,或者在我更改当前时间时继续!)

any suggestions? 有什么建议么?

Check this out, very helpful. 检查一下,非常有帮助。 http://remysharp.com/2010/12/23/audio-sprites/ http://remysharp.com/2010/12/23/audio-sprites/

I ran this, to see if it could play: 我运行了这个程序,看它是否可以播放:

    try {
                audio.pause();
                audio.currentTime = $( "#sliderOfTrack"+trackid).slider( "values", 0);
            } catch (e) {
              // what now?
            }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM