From 7659b6ec3e83ad014866eb3a4a26c793f592b99a Mon Sep 17 00:00:00 2001 From: Steve Seguin Date: Mon, 1 Nov 2021 07:41:48 -0400 Subject: [PATCH] transfer and room settings expanded --- index.html | 72 ++++--- lib.js | 510 ++++++++++++++++++++++++++++++++++++++------- main.css | 12 +- main.js | 24 ++- mixer.html | 593 +++++++++++++++++++++++++++++++++++++++++++++++++++++ webrtc.js | 2 +- 6 files changed, 1107 insertions(+), 106 deletions(-) create mode 100644 mixer.html diff --git a/index.html b/index.html index 2e122a0..2ec1348 100644 --- a/index.html +++ b/index.html @@ -67,7 +67,7 @@ - + @@ -1817,41 +1837,41 @@ ///// The following lets you set the defaults // session.webcamonly // true,false - // session.stereo // 0,1,2,3 + // session.stereo // 0,1,2,3,4,5 // session.audiobitrate // int in kbps - // session.view // "xxxx" - // session.remote - // session.optimize - // session.disableOBS - // session.audio - // session.video - // session.forceios - // session.nocursor + // session.view // "xxxx" ; the stream ID or a list of Stream IDs to Connect to. Not the same as &noaudio/&novideo. Set to "" (empty) if you don't wish to connect to any. + // session.remote // See docs, but allows for remote stats monitoring and remote focus/zoom control + // session.optimize // Whether to optimize invisible scenes in OBS. See docs.vdo.ninja + // session.disableOBS // If true, will disable any OBS-specific events/functions. + // session.noaudio // False by default, otherwise specify a list [] of stream IDs to allow. Listing none allows no incoming audio streams + // session.novideo // False by default, otherwise specify a list [] of stream IDs to allow. Listing none allows no incoming video streams + // session.forceios // If true, will allow iOS devices to send H264 video to other guests in a room + // session.nocursor // hides the cursor using CSS // session.codec // default codec; maybe h264 is useful? the default is up to the browser normally - // session.scale + // session.scale // By default, scale is self-optimizing, but you can set a value of 1 to 100 to choose the playback scale of all incoming video streams // session.bitrate // int in kbps -- you can set the default max target bitrate here // session.totalRoomBitrate = 500; // int, kbps -- you can set the default quality of the group room here - // session.height // int - // session.width // int - // session.quality // int -- if setting == 0, then than the default resolution will be 1080p, instead of 720p - // session.sink - // session.offsetChannel //2 int + // session.height // int ; height to publish a video stream at. Will fail if not supported by the camera + // session.width // int ; see above + // session.quality // int -- if setting == 0, then than the default resolution will be 1080p, instead of 720p60 (q=1) , while q=2 = 360p30. + // session.sink // Output device to playback audio to. see the docs + // session.offsetChannel // int // session.audioChannels // int - // session.security - // session.framerate // int - // session.sync - // session.buffer // int in milliseconds - // session.roomid // "yyyy" - // session.scene - // session.title // "zzzz" + // session.security // true to disable the wss connection after the first peer connection is made + // session.framerate // int ; publishing frame rate. will fail if camera does not support it. + // session.sync // see the docs + // session.buffer // int in milliseconds ; see the docs + // session.roomid // "yyyy" -- the room name to use. alphanumeric. + // session.scene // the scene name. Scene 0, 1, ... 8, or any custom scene name is supported. STRING value. Needed to have a clean view link of a guest stream + // session.title // "zzzz" ; sets the title of the browser page. // session.introOnClean = true; // this will load the page with the webcam selection screen if &push or &room is in the URL; no need to use &webcam. - + - + diff --git a/lib.js b/lib.js index 9a7d4ea..28e4c42 100644 --- a/lib.js +++ b/lib.js @@ -56,7 +56,7 @@ var miscTranslations = { "allowed-chars" : "Allowed chars", "transfer" : "transfer", "armed" : "armed", - "transfer-guest-to-room" : "Transfer guests to room:\n\n(Please note rooms must share the same password)", + "transfer-guest-to-room" : "Transfer guests to room:\n\n(Please note: rooms must share the same password)", "transfer-guest-to-url" :"Transfer guests to new website URL.\n\n(Guests will be prompted to accept)", "change-url" : "change URL", "mute-in-scene" : "mute in scene", @@ -70,7 +70,9 @@ var miscTranslations = { "unhide" : "unhide guest", "hide-guest": "hide guest", "confirm-disconnect-users": "Are you sure you wish to disconnect these users?", - "confirm-disconnect-user": "Are you sure you wish to disconnect this user?" + "confirm-disconnect-user": "Are you sure you wish to disconnect this user?", + "enter-new-codirector-password": "Enter a co-director password to use", + "control-room-co-director": "Control Room: Co-Director" }; // function log(msg){ // uncomment to enable logging. @@ -348,7 +350,7 @@ async function delay(ms) { } var Prompts = {}; -async function promptAlt(inputText, block=false, asterix=false){ +async function promptAlt(inputText, block=false, asterix=false, value=false){ var result = null; if (session.beepToNotify){ playtone(); @@ -373,12 +375,14 @@ async function promptAlt(inputText, block=false, asterix=false){ if (asterix){ type = "password"; } + + modalTemplate = `