Browse Source

try to fix the script for the audio

master
nglk 4 years ago
parent
commit
530bc6c54d
  1. 2
      index.html

2
index.html

@ -175,12 +175,10 @@ 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;
} }

Loading…
Cancel
Save