我有一个 5 秒长的波形文件。 如何实现可以从时间线中的一个点播放到另一个点的播放功能。 例如,播放3.00s - 4.00s(仅播放原始波形的一段)
最佳答案
未经测试,但您可以检查:MDN: Using HTML5 audio and video # Specifying play back range
A few examples:
http://foo.com/video.ogg#t=10,20
Specifies that the video should play the range 10 seconds through 20 seconds.
http://foo.com/video.ogg#t=,10.5
Specifies that the video should play from the beginning through 10.5 seconds.
http://foo.com/video.ogg#t=,02:00:00
Specifies that the video should play from the beginning through two hours.
http://foo.com/video.ogg#t=60,
Specifies that the video should start playing at 60 seconds and play through the end of the video.
关于javascript - html5 + javascript 播放波浪声音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12723646/