Continued work expirementing with WebRTC

This commit is contained in:
rainbow napkin 2026-09-24 17:16:29 -04:00
parent 3517a1499a
commit 86e9c586b6
7 changed files with 341 additions and 15 deletions

View file

@ -369,11 +369,6 @@ class queue{
return;
}
/*if(chanDB.settings.streamType == "webrtc"){
console.log("WEBRTC ENABLED, BAILING!");
return;
}*/
//If something is playing
if(this.nowPlaying != null){
//Capture currently playing object
@ -410,6 +405,10 @@ class queue{
}
rawLink = {combo:[['default',streamURL]]};
//Otherwise if we're starting a web RTC Stream
}else if(chanDB.settings.streamType == "webrtc"){
//Let our webRTCHandler know
this.channel.webRTCHandler.startStream(socket);
}
//Create queued media object from stream URL and set it to nowPlaying
@ -1351,6 +1350,11 @@ class queue{
//Set duration from start and end time
wasPlaying.duration = (now - wasPlaying.startTime) / 1000;
//If we're ending a webrtc stream
if(wasPlaying.type == "webrtc"){
this.channel.webRTCHandler.endStream();
}
//If we're in pushback mode
if(this.liveMode == "pushback"){
await this.livestreamPushbackSchedule(wasPlaying, chanDB);