changed some part of the audio code

This commit is contained in:
nglk 2021-03-24 18:26:34 +01:00
parent 530bc6c54d
commit a4966595bf

View File

@ -91,7 +91,7 @@
<!-- AUDIO NEW CODE --> <!-- AUDIO NEW CODE -->
<span class="stream"> <span class="stream">
<audio id="player" preload="none" src="http://w-i-t-m.net:8001/meander"> </audio><br> <audio id="player" preload="none" src="https://vvvvvvaria.org/archive/2020-04-18-we-hope-this-email-finds-you-well/we-hope-this-email-finds-you-well.wav"> </audio><br>
Press play (best listened in FireFox). It might take a minute to load. Press play (best listened in FireFox). It might take a minute to load.
<div> <div>
<button class="stream-button" onclick="document.getElementById('player').play()">Play</button> <button class="stream-button" onclick="document.getElementById('player').play()">Play</button>
@ -175,10 +175,12 @@ Press play (best listened in FireFox). It might take a minute to load.
function waitForIt(selector, time) { function waitForIt(selector, time) {
if(document.querySelector(selector)!=null) { if(document.querySelector(selector)!=null) {
var chat_title = document.getElementsByClassName("chatbox-title__text")[0];
var element = document.createElement("span"); var element = document.createElement("span");
element.innerHTML = '<audio id="player" preload="none" src="http://w-i-t-m.net:8001/radiodrama"></audio><div><button onclick="document.getElementById(\'player\').play()">Play</button><button onclick="document.getElementById(\'player\').pause();document.getElementById(\'player\').src=document.getElementById(\'player\').src;">Stop</button><button onclick="document.getElementById(\'player\').volume += 0.1">Vol +</button><button onclick="document.getElementById(\'player\').volume -= 0.1">Vol -</button></div>'; element.innerHTML = '<audio id="player" preload="none" src="http://w-i-t-m.net:8001/radiodrama"></audio><div><button onclick="document.getElementById(\'player\').play()">Play</button><button onclick="document.getElementById(\'player\').pause();document.getElementById(\'player\').src=document.getElementById(\'player\').src;">Stop</button><button onclick="document.getElementById(\'player\').volume += 0.1">Vol +</button><button onclick="document.getElementById(\'player\').volume -= 0.1">Vol -</button></div>';
chat_title.insertAdjacentElement('afterend', element);
return; return;
} }
@ -193,6 +195,14 @@ Press play (best listened in FireFox). It might take a minute to load.
waitForIt(".toggle-smiley", 1000); waitForIt(".toggle-smiley", 1000);
})(); })();
$(function() {
console.log("PARENT READY");
$("iframe").on("load", function(){
console.log("LOADED");
$(this).contents().find('.kiwi-startup-common').hide();
});
});
</script> </script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>