Commit c85c64a7 by vito

audio

parent d2dc5e3a
......@@ -89,7 +89,15 @@
Copyright©zhangyongfeng5350@gmail.com
</span>
<audio id="audiobg" :src="audioSrc" preload="auto" controls autoplay loop>
<audio
id="audiobg"
preload="auto"
controls
autoplay
loop
@play="playHandler"
>
<source :src="audioSrc" />
你的浏览器不支持audio标签
</audio>
</div>
......@@ -235,6 +243,9 @@ export default {
}, 1000);
},
methods: {
playHandler() {
this.audioPlaying = true;
},
playAudio(type) {
if (type) {
this.$el.querySelector('#audiobg').play();
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment