Custom audio audio player

Here first put an audio interface description document

Click to jump to W3cschool tutorial

I will give a small example here using js native

let audio = document.querySelector("#audio")
// 获取aodio
audio.src="niubi.mp3"
// 修改audio的属性
audio.play()
// js控制audio开始播放下一首,还有好多 自行查看3c文档

As for custom audio controls

In fact, it does not display the native, use the controls designed and implemented by yourself, control the audio through js for different operations, as long as you like to play the drums, how to play haha

Guess you like

Origin www.cnblogs.com/lambertlt/p/12735988.html