soiz1 commited on
Commit
770bacf
·
verified ·
1 Parent(s): 15f607e

Update index.html

Browse files
Files changed (1) hide show
  1. 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();