Initial Upload
This commit is contained in:
commit
b97d271223
210 changed files with 8772 additions and 0 deletions
19
res/asset-js-audio.js
Normal file
19
res/asset-js-audio.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
function onlyPlayOneIn(container) {
|
||||
container.addEventListener(
|
||||
"play",
|
||||
function (event) {
|
||||
audio_elements = container.getElementsByTagName("audio");
|
||||
for (i = 0; i < audio_elements.length; i++) {
|
||||
audio_element = audio_elements[i];
|
||||
if (audio_element !== event.target) {
|
||||
audio_element.pause();
|
||||
}
|
||||
}
|
||||
},
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
onlyPlayOneIn(document.body);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue