2019-05-13 22:37:24 +02:00
|
|
|
Title: stream
|
|
|
|
Category: meta
|
|
|
|
Slug: stream
|
|
|
|
lang: en
|
2019-05-13 22:53:12 +02:00
|
|
|
Date: 2017-04-09
|
2020-04-17 00:24:36 +02:00
|
|
|
|
|
|
|
<span class="stream">
|
|
|
|
<audio id="player" preload="none" src="http://w-i-t-m.net:8001/radiodrama"> </audio>
|
|
|
|
<div>
|
|
|
|
<button class="stream-button" onclick="document.getElementById('player').play()">Play</button>
|
|
|
|
<button class="stream-button" onclick="document.getElementById('player').pause();document.getElementById('player').src=document.getElementById('player').src;">Stop</button>
|
|
|
|
<button class="stream-button" onclick="document.getElementById('player').volume += 0.1">Vol +</button>
|
|
|
|
<button class="stream-button" onclick="document.getElementById('player').volume -= 0.1">Vol -</button>
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<iframe src="https://webchat.freenode.net/?#varia" height="400" width="300"></iframe>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
(function(){
|
|
|
|
|
|
|
|
function waitForIt(selector, time) {
|
|
|
|
if(document.querySelector(selector)!=null) {
|
|
|
|
|
|
|
|
var chat_title = document.getElementsByClassName("chatbox-title__text")[0];
|
|
|
|
var element = document.createElement("span");
|
|
|
|
|
|
|
|
element.innerHTML = '<audio id="player" preload="none" src="https://echo.lurk.org:999/echochamber"></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;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
setTimeout(function() {
|
|
|
|
|
|
|
|
waitForIt(selector, time);
|
|
|
|
|
|
|
|
}, time);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
waitForIt(".toggle-smiley", 1000);
|
|
|
|
})();
|
|
|
|
</script>
|