ch1ller0 / fridgefm-radio-core

Simple lightweight package for creating your own radio station via NodeJS heavily inspired by Shoutcast and Icecast.
https://fridgefm.com
MIT License
47 stars 9 forks source link

Admin controls don't work #325

Closed LaganYT closed 1 year ago

LaganYT commented 2 years ago

When i run the direct repo the admin controls don't work. what can i do to fix this?

LaganYT commented 2 years ago

I have found a temporary fix:

  <audio controls src='/stream' type='audio/mp3'></audio>
   <button onclick="hi()">Shuffle Playlist</button>
   <button onclick="hiz()">Next Song</button>
   <button onclick="hix()">Show Playlist</button>
    <iframe id="change" style="border:0px #ffffff none;" name="myiFrame" scrolling="yes" frameborder="0" marginheight="0px" marginwidth="0px" height="500" width="1000" allowfullscreen></iframe>
<script>
        function hi() {
        var changez = document.getElementById("change")
       var rand =  "/controls/shufflePlaylist"
       changez.src=rand
        }
        function hiz() {
        var changez = document.getElementById("change")
       var rand =   "/controls/next"
       changez.src=rand
        }
        function hix() {
        var changez = document.getElementById("change")
       var rand =   "/controls/getPlaylist"
       changez.src=rand
        }
    </script>
ch1ller0 commented 2 years ago

Hey, could you please send the logs from the console when you press the admin buttons?

LaganYT commented 2 years ago

I do not have any logs it just doesn't do anything. I'm using the demo.