-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·72 lines (60 loc) · 2.58 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>我在人间捡故事</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/sidebar.min.css"/>
</head>
<body>
<audio controls="controls" autoplay="autoplay">
<source src="./music/bg.mp3" type="audio/mpeg"/>
<source src="./music/嘉宾.mp3" type="audio/mpeg"/>
Your browser does not support the audio element.
</audio>
<div id="app"></div>
<!-- <div id="audioBox" style="float: right">-->
</div>
<script>
window.$docsify = {
name: '',
repo: '',
loadSidebar: true,
subMaxLevel: 3,
sidebarDisplayLevel: 0, // set sidebar display level
coverpage: true,
onlyCover: false,
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/docsify-sidebar-collapse.min.js"></script>
<!--<script type="text/javascript">-->
<!-- window.onload = function(){-->
<!-- debugger-->
<!-- var arr = ["./music/嘉宾.mp3","./music/bg.mp3"]; //把需要播放的歌曲从后往前排,这里已添加两首音乐,可继续添加多个音乐-->
<!-- var myAudio = new Audio();-->
<!-- myAudio.preload = true;-->
<!-- myAudio.controls = true;-->
<!-- myAudio.src = arr.pop(); //每次读数组最后一个元素-->
<!-- myAudio.addEventListener('ended', playEndedHandler, false);-->
<!-- myAudio.play();-->
<!-- document.getElementById("audioBox").appendChild(myAudio);-->
<!-- myAudio.loop = false;//禁止循环,否则无法触发ended事件-->
<!-- function playEndedHandler(){-->
<!-- myAudio.src = arr.pop();-->
<!-- myAudio.play();-->
<!-- console.log(arr.length);-->
<!-- !arr.length && myAudio.removeEventListener('ended',playEndedHandler,false);//只有一个元素时解除绑定-->
<!-- }-->
<!-- }-->
<!--</script>-->
</body>
</html>