Audio playback in mobile UC browser

I want to replace the src, of audio and then use JS to operate audio playback when the touchstart event of a button is triggered. The code looks like this

<div class="content"
@click="handler($event)"
@touchstart.prevent="handler($event)"></div>

<audio :src="audioSrc" ref="audio"
@canplay="$refs.audio.play()" 

handler() {
    this.$refs.audio.src = "xxx";
}

but in UC browsers, audio will not be played, and corresponding events such as play,playing will not be triggered, what should I do?

Sep.05,2021

there is a problem when the audio tag is triggered on the mobile. Use AudioContext to solve

.
Menu