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

@ -944,11 +944,6 @@ class WebRTCLivestreamHandler extends rawFileBase{
//Call derived constructor
super(client, player, media, "webrtc");
/**
* Internet Connectivity Establishment configuration
*/
this.iceConfig = {iceServers: new Map(media.rawLink.combo).get('default')};
this.defineListeners();
}
@ -960,6 +955,25 @@ class WebRTCLivestreamHandler extends rawFileBase{
this.video.addEventListener('contextmenu', (e)=>{e.preventDefault()});
}
async buildPlayer(){
//Call derived buildPlayer function
super.buildPlayer();
/**
* set Internet Connectivity Establishment configuration
*/
this.client.webRTCHandler.iceConfig = {
iceServers: new Map(this.nowPlaying.rawLink.combo).get('default')
};
//If we're not streaming
if(!this.client.webRTCHandler.isStreaming){
//Send stream request
await this.client.webRTCHandler.requestStream();
}
}
start(){
//call derived start function
super.start();