SFU support added, SFU configured, IPC support session server added

This commit is contained in:
2023-04-19 21:54:43 +03:00
parent 063e8c25b7
commit 51cc0b14fb
8 changed files with 865 additions and 7 deletions
@@ -4,6 +4,8 @@
* Class definitions
* TODO: Move these to seperate files once we introduce a bundler
*/
class TwoWayMap {
constructor(map = {}) {
this.map = map;
@@ -881,7 +883,7 @@ function setupHtmlEvents() {
}
// Setup toggle and pair with some URL query string param.
setupToggleWithUrlParams("prefer-sfu-tgl", "preferSFU");
//setupToggleWithUrlParams("prefer-sfu-tgl", "preferSFU");
setupToggleWithUrlParams("use-mic-tgl", "useMic");
setupToggleWithUrlParams("force-turn-tgl", "ForceTURN");
setupToggleWithUrlParams("force-mono-tgl", "ForceMonoAudio");
@@ -75,7 +75,8 @@ function webRtcPlayer(parOptions) {
}
// Prefer SFU or P2P connection
this.preferSFU = urlParams.has('preferSFU');
this.preferSFU = true//urlParams.has('preferSFU');
console.log('USING SFU: ', this.preferSFU)
console.log(this.preferSFU ?
"The browser will signal it would prefer an SFU connection. Remove ?preferSFU from the url to signal for P2P usage." :
"The browser will signal for a P2P connection. Pass ?preferSFU in the url to signal for SFU usage.");