Updated scheduler to ensure client knows channel streamtype at time of clicking 'go-live' button.

This commit is contained in:
rainbow napkin 2026-07-07 21:25:27 -04:00
parent a819d14861
commit 6d8135d1e3
4 changed files with 50 additions and 4 deletions

View file

@ -117,6 +117,10 @@ class channel{
this.queueLock = data.locked;
});
this.socket.on("streamType", (data) => {
this.streamType = data.streamType;
});
this.queueBroadcastSocket.on("queue", (data) => {
this.queue = new Map(data.queue);
});
@ -146,6 +150,9 @@ class channel{
//Store queue lock status
this.queueLock = data.queueLock;
//Store streamType
this.streamType = data.streamType;
}
/**

View file

@ -54,6 +54,8 @@ class queuePanel extends panelObj{
*/
this.playlistManager = new playlistManager(client, panelDocument, this);
this.streamType = "";
//Define non-input event listeners
this.defineListeners();
}
@ -65,6 +67,9 @@ class queuePanel extends panelObj{
//Call derived doc switch function
super.docSwitch();
//Request Channel Stream Type
this.client.socket.emit('getStreamType');
//Get queue div
this.queue = this.panelDocument.querySelector('#queue');
//Get queue container
@ -243,6 +248,10 @@ class queuePanel extends panelObj{
}
}
handleStreamType(data){
}
/* queue control button functions */
/**
@ -269,6 +278,9 @@ class queuePanel extends panelObj{
* @param {Event} event - Event passed down from Event Listener
*/
toggleGoLive(event){
//Request stream type from the server Just-InCase™
client.socket.emit('getStreamType');
//If we're not livestreaming
if(client.player.mediaHandler.type != "livehls"){
//If the div is hidden