Skip to content

Commit

Permalink
None
Browse files Browse the repository at this point in the history
  • Loading branch information
KuranosukeOhta committed Jul 18, 2021
1 parent fe24b64 commit 7bba130
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
3 changes: 0 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

<h1>Flight Information Display</h1>

<i class="fa fa-apple" aria-hidden="true"></i>

<audio src="sounds/Chime.mp3"></audio>


<div class="row">
Expand Down Expand Up @@ -64,7 +62,6 @@ <h1>Flight Information Display</h1>
</div>


<i class="fa fa-comment" aria-hidden="true"></i>
<iframe src="https://raw.githubusercontent.com/anars/blank-audio/master/500-milliseconds-of-silence.mp3" allow="autoplay" id="audio" style="display:none"></iframe>


Expand Down
11 changes: 2 additions & 9 deletions sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,11 @@

<h1>SandBox</h1>

<iframe src="https://raw.githubusercontent.com/anars/blank-audio/master/500-milliseconds-of-silence.mp3" allow="autoplay" id="audio" style="display:none"></iframe>
<script src="sound_test.js"></script>


<audio>
<audio autoplay id="audio">
<source src="sounds/Chime.mp3">
<p>未対応です</p>
</audio>

<script>
var music = new Audio('sounds/Chime.mp3');
music.play(); // 再生
</script>

</body>
</html>
5 changes: 5 additions & 0 deletions sound_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
document.addEventListener('click', audioPlay);
function audioPlay() {
document.getElementById('audio').play();
document.removeEventListener('click', audioPlay);
}

0 comments on commit 7bba130

Please sign in to comment.