Spaces:
Running
Running
Update index.html
Browse files- index.html +8 -0
index.html
CHANGED
@@ -118,6 +118,14 @@
|
|
118 |
video.loop = loopCheckbox.checked;
|
119 |
});
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
function goFullscreen() {
|
122 |
if (video.requestFullscreen) {
|
123 |
video.requestFullscreen();
|
|
|
118 |
video.loop = loopCheckbox.checked;
|
119 |
});
|
120 |
|
121 |
+
// 動画の再生を始める
|
122 |
+
video.addEventListener('play', () => {
|
123 |
+
// Web Audio APIの音声を再生
|
124 |
+
if (audioContext.state === 'suspended') {
|
125 |
+
audioContext.resume(); // 再生前にオーディオコンテキストが一時停止している場合、再開
|
126 |
+
}
|
127 |
+
});
|
128 |
+
|
129 |
function goFullscreen() {
|
130 |
if (video.requestFullscreen) {
|
131 |
video.requestFullscreen();
|