diff --git a/src/views/partial/panels/settings.ejs b/src/views/partial/panels/settings.ejs index ad14ec5..ac3cb93 100644 --- a/src/views/partial/panels/settings.ejs +++ b/src/views/partial/panels/settings.ejs @@ -18,15 +18,32 @@ along with this program. If not, see . %>

Client Settings

Player Settings

-

Youtube Player Type:

+

Youtube Player Type:

-

Internet Archive CDN Server:

+

Internet Archive CDN Server:

+ +

Syncronization Tolerance:

+ +
+ +

Livestream Sync Tolerance:

+ +
+ +

Syncronization Delta:

+ +
+

Chat Settings

+ +

Aspect-Ratio Lock Chat Width Minimum:

+ +
\ No newline at end of file diff --git a/www/css/panel/settings.css b/www/css/panel/settings.css index 869e0d5..56b0790 100644 --- a/www/css/panel/settings.css +++ b/www/css/panel/settings.css @@ -36,10 +36,15 @@ along with this program. If not, see .*/ text-wrap: nowrap; height: 1em; align-items: center; + justify-content: space-between; max-width: 30em; width: 100% } +.settings-panel-setting input[type=number]{ + flex: 0 1 4em; +} + .settings-panel-setting :is(input, select){ width: 1px; flex: 1 1 auto; diff --git a/www/doc/client/addURLPopup.html b/www/doc/client/addURLPopup.html index 9afb3a0..e59bd9d 100644 --- a/www/doc/client/addURLPopup.html +++ b/www/doc/client/addURLPopup.html @@ -875,7 +875,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/cPanel.html b/www/doc/client/cPanel.html index 6e28375..66be9d8 100644 --- a/www/doc/client/cPanel.html +++ b/www/doc/client/cPanel.html @@ -2602,7 +2602,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/channel.html b/www/doc/client/channel.html index 030583f..12d5a85 100644 --- a/www/doc/client/channel.html +++ b/www/doc/client/channel.html @@ -377,7 +377,7 @@
Source:
@@ -1254,7 +1254,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/channel.js.html b/www/doc/client/channel.js.html index c713518..99fe36d 100644 --- a/www/doc/client/channel.js.html +++ b/www/doc/client/channel.js.html @@ -194,6 +194,9 @@ class channel{ * @param {*} value - Value to set setting to */ processConfig(key, value){ + //Unfortunately we can't scope constants to switch-cases so this is the best we got if we wanna re-use the name + let nowPlaying; + //Switch/case by config key switch(key){ case 'ytPlayerType': @@ -233,18 +236,75 @@ class channel{ return; } - //Get current video - const nowPlaying = this.player.mediaHandler.nowPlaying; + nowPlaying = this.player.mediaHandler.nowPlaying; //If we're playing a youtube video if(nowPlaying != null && nowPlaying.type == 'yt'){ //Restart the video - this.player.start({media: nowPlaying}); + this.player.hardReload(); } //Stop while we're ahead return; + + case 'IACDN': + //If the player or mediaHandler isn't loaded + if(this.player == null || this.player.mediaHandler == null){ + //We're fuggin done here + return; + } + + //Get current video + nowPlaying = this.player.mediaHandler.nowPlaying; + + //If we're playing a video from Internet Archive + if(nowPlaying != null && nowPlaying.type == 'ia'){ + //Hard reload the media, forcing media handler re-creation + this.player.hardReload(); + } + + return; + case 'syncTolerance': + //If the player isn't loaded + if(this.player == null){ + //We're fuckin' done here + return; + } + + //Set syncronization tolerance + this.player.syncTolerance = value; + return; + case 'liveSyncTolerance': + //If the player isn't loaded + if(this.player == null){ + //We're fuckin' done here + return; + } + + //Set syncronization tolerance + this.player.streamSyncTolerance = value; + return; + case 'syncDelta': + //If the player isn't loaded + if(this.player == null){ + //We're fuckin' done here + return; + } + + //Set syncronization delta + this.player.syncDelta = value; + return; + case 'chatWidthMin': + //If the chat isn't loaded + if(this.chatBox == null){ + //We're fuckin' done here + return; + } + + //Set Chat Box Width minimum while Locked to Aspect-Ratio + this.chatBox.chatWidthMinimum = value / 100; + return; } } @@ -252,7 +312,12 @@ class channel{ * Default channel config */ static defaultConfig = new Map([ - ["ytPlayerType","raw"] + ["ytPlayerType","raw"], + ["IACDN",""], + ["syncTolerance",0.4], + ["liveSyncTolerance", 2], + ["syncDelta", 6], + ["chatWidthMin", 20] ]); } @@ -289,7 +354,7 @@ const client = new channel();
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/chat.js.html b/www/doc/client/chat.js.html index f5991b6..be80679 100644 --- a/www/doc/client/chat.js.html +++ b/www/doc/client/chat.js.html @@ -66,6 +66,11 @@ class chatBox{ */ this.autoScroll = true; + /** + * Chat-Width Minimum while sized to media Aspect-Ratio + */ + this.chatWidthMinimum = localStorage.getItem('chatWidthMin') / 100; + /** * Chat Buffer Scroll Top on last scroll */ @@ -528,10 +533,10 @@ L /** var targetVidWidth = this.client.player.getRatio() * this.chatPanel.getBoundingClientRect().height; const targetChatWidth = window.innerWidth - targetVidWidth; //This should be changeable in settings later on, for now it defaults to 20% - const limit = window.innerWidth * .2; + const limit = window.innerWidth * this.chatWidthMinimum; - //Set width to target or 20vh depending on whether or not we've hit the width limit - this.chatPanel.style.flexBasis = targetChatWidth > limit ? `${targetChatWidth}px` : '20vh'; + //Set width to target or 20vw depending on whether or not we've hit the width limit + this.chatPanel.style.flexBasis = targetChatWidth > limit ? `${targetChatWidth}px` : `${this.chatWidthMinimum * 100}vw`; //Fix busted layout var pageBreak = document.body.scrollWidth - document.body.getBoundingClientRect().width; @@ -662,7 +667,7 @@ L /**
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/chatBox.html b/www/doc/client/chatBox.html index 81a0bc4..caddc0c 100644 --- a/www/doc/client/chatBox.html +++ b/www/doc/client/chatBox.html @@ -240,7 +240,7 @@
Source:
@@ -365,7 +365,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -489,7 +489,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -551,7 +551,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -613,7 +613,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -675,7 +675,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -737,7 +737,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -799,7 +799,69 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
+ + + + + + + + + + + + + + + + +

chatWidthMinimum

+ + + + +
+ Chat-Width Minimum while sized to media Aspect-Ratio +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -861,7 +923,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -985,7 +1047,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1047,7 +1109,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1109,7 +1171,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1171,7 +1233,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1233,7 +1295,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1295,7 +1357,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1357,7 +1419,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1419,7 +1481,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1481,7 +1543,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1543,7 +1605,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1605,7 +1667,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1734,7 +1796,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -1871,7 +1933,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -2030,7 +2092,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -2118,7 +2180,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -2255,7 +2317,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -2392,7 +2454,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -2480,7 +2542,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -2617,7 +2679,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -2754,7 +2816,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -2891,7 +2953,7 @@ Seems weird to stick this in here, but the split is dictated by chat width :P
Source:
@@ -3029,7 +3091,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -3166,7 +3228,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -3303,7 +3365,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -3440,7 +3502,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -3577,7 +3639,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -3665,7 +3727,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -3753,7 +3815,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -3890,7 +3952,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -4027,7 +4089,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -4164,7 +4226,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -4301,7 +4363,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -4461,7 +4523,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -4598,7 +4660,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
Source:
@@ -4650,7 +4712,7 @@ Also prevents horizontal scroll-bars from chat/window resizing
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/chatPostprocessor.html b/www/doc/client/chatPostprocessor.html index f2f06ee..bb1dc90 100644 --- a/www/doc/client/chatPostprocessor.html +++ b/www/doc/client/chatPostprocessor.html @@ -1794,7 +1794,7 @@ Internal command used by several text filters to prevent code re-writes
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/chatPostprocessor.js.html b/www/doc/client/chatPostprocessor.js.html index bbaf312..fe217a0 100644 --- a/www/doc/client/chatPostprocessor.js.html +++ b/www/doc/client/chatPostprocessor.js.html @@ -671,7 +671,7 @@ class chatPostprocessor{
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/clearPopup.html b/www/doc/client/clearPopup.html index cf6e243..0717d03 100644 --- a/www/doc/client/clearPopup.html +++ b/www/doc/client/clearPopup.html @@ -790,7 +790,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/commandPreprocessor.html b/www/doc/client/commandPreprocessor.html index 6e246c5..fa0d109 100644 --- a/www/doc/client/commandPreprocessor.html +++ b/www/doc/client/commandPreprocessor.html @@ -1912,7 +1912,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/commandPreprocessor.js.html b/www/doc/client/commandPreprocessor.js.html index 7b12efd..e9f4fa2 100644 --- a/www/doc/client/commandPreprocessor.js.html +++ b/www/doc/client/commandPreprocessor.js.html @@ -371,7 +371,7 @@ class commandProcessor{
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/commandProcessor.html b/www/doc/client/commandProcessor.html index 3c0c1cb..a5325c6 100644 --- a/www/doc/client/commandProcessor.html +++ b/www/doc/client/commandProcessor.html @@ -421,7 +421,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/cpanel.js.html b/www/doc/client/cpanel.js.html index f457257..b992b2c 100644 --- a/www/doc/client/cpanel.js.html +++ b/www/doc/client/cpanel.js.html @@ -515,7 +515,7 @@ class poppedPanel{
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/defaultTitlesPopup.html b/www/doc/client/defaultTitlesPopup.html index 32b3bc8..6baa3fe 100644 --- a/www/doc/client/defaultTitlesPopup.html +++ b/www/doc/client/defaultTitlesPopup.html @@ -960,7 +960,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/emotePanel.html b/www/doc/client/emotePanel.html index 2c10c4e..ad9a98e 100644 --- a/www/doc/client/emotePanel.html +++ b/www/doc/client/emotePanel.html @@ -2249,7 +2249,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/global.html b/www/doc/client/global.html index 8e96f76..65242c2 100644 --- a/www/doc/client/global.html +++ b/www/doc/client/global.html @@ -156,7 +156,7 @@
Source:
@@ -208,7 +208,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/hlsBase.html b/www/doc/client/hlsBase.html index b7ca232..7647acb 100644 --- a/www/doc/client/hlsBase.html +++ b/www/doc/client/hlsBase.html @@ -2919,7 +2919,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/hlsLiveStreamHandler.html b/www/doc/client/hlsLiveStreamHandler.html index e224c82..2cfd09b 100644 --- a/www/doc/client/hlsLiveStreamHandler.html +++ b/www/doc/client/hlsLiveStreamHandler.html @@ -2896,7 +2896,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/index.html b/www/doc/client/index.html index e4fd518..5b9523a 100644 --- a/www/doc/client/index.html +++ b/www/doc/client/index.html @@ -87,7 +87,7 @@ This new codebase intends to solve the following issues with the current CyTube
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/mediaHandler.html b/www/doc/client/mediaHandler.html index 19ff7f9..b3d8708 100644 --- a/www/doc/client/mediaHandler.html +++ b/www/doc/client/mediaHandler.html @@ -2701,7 +2701,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/mediaHandler.js.html b/www/doc/client/mediaHandler.js.html index 681285e..71350a6 100644 --- a/www/doc/client/mediaHandler.js.html +++ b/www/doc/client/mediaHandler.js.html @@ -787,7 +787,7 @@ class hlsLiveStreamHandler extends hlsBase{ super.onBuffer(event); - //If we're synced by the end of buffering + //If we're supposed to be synced by the end of buffering if(this.player.syncLock){ //Throw flag to manually sync since this works entirely differently from literally every other fucking media source this.reSync = true; @@ -835,7 +835,7 @@ class hlsLiveStreamHandler extends hlsBase{
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/newPlaylistPopup.html b/www/doc/client/newPlaylistPopup.html index bb512fe..c33d0c9 100644 --- a/www/doc/client/newPlaylistPopup.html +++ b/www/doc/client/newPlaylistPopup.html @@ -705,7 +705,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/nullHandler.html b/www/doc/client/nullHandler.html index f3cc015..30b6fd5 100644 --- a/www/doc/client/nullHandler.html +++ b/www/doc/client/nullHandler.html @@ -2873,7 +2873,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/panelObj.html b/www/doc/client/panelObj.html index 5def7f1..5b4e567 100644 --- a/www/doc/client/panelObj.html +++ b/www/doc/client/panelObj.html @@ -909,7 +909,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/panels_emotePanel.js.html b/www/doc/client/panels_emotePanel.js.html index b37fd8d..23a022f 100644 --- a/www/doc/client/panels_emotePanel.js.html +++ b/www/doc/client/panels_emotePanel.js.html @@ -353,7 +353,7 @@ class emotePanel extends panelObj{
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/panels_queuePanel_playlistManager.js.html b/www/doc/client/panels_queuePanel_playlistManager.js.html index 532ca0a..10dcabb 100644 --- a/www/doc/client/panels_queuePanel_playlistManager.js.html +++ b/www/doc/client/panels_queuePanel_playlistManager.js.html @@ -983,7 +983,7 @@ class renamePopup{
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/panels_queuePanel_queuePanel.js.html b/www/doc/client/panels_queuePanel_queuePanel.js.html index d9bfe08..dff9be9 100644 --- a/www/doc/client/panels_queuePanel_queuePanel.js.html +++ b/www/doc/client/panels_queuePanel_queuePanel.js.html @@ -1679,7 +1679,7 @@ class clearPopup{
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/panels_settingsPanel.js.html b/www/doc/client/panels_settingsPanel.js.html index 74b8727..72232f3 100644 --- a/www/doc/client/panels_settingsPanel.js.html +++ b/www/doc/client/panels_settingsPanel.js.html @@ -60,8 +60,36 @@ class settingsPanel extends panelObj{ } docSwitch(){ + /** + * Youtube Source Selector + */ this.youtubeSource = this.panelDocument.querySelector("#settings-panel-youtube-source select"); + /** + * Internet Archive CDN Server Input + */ + this.iaCDN = this.panelDocument.querySelector("#settings-panel-ia-server input"); + + /** + * Syncronization Tolerance Input + */ + this.syncTolerance = this.panelDocument.querySelector("#settings-panel-sync-tolerance input"); + + /** + * Livestream Syncronization Tolerance Input + */ + this.liveSyncTolerance = this.panelDocument.querySelector("#settings-panel-live-sync-tolerance input"); + + /** + * Syncronization Tolerance Delta + */ + this.syncDelta = this.panelDocument.querySelector("#settings-panel-sync-delta input"); + + /** + * Chat Width Minimum while Size-Locked to Media Aspect Ratio + */ + this.chatWidthMinimum = this.panelDocument.querySelector("#settings-panel-min-chat-width input"); + this.renderSettings(); this.setupInput(); } @@ -71,6 +99,11 @@ class settingsPanel extends panelObj{ */ setupInput(){ this.youtubeSource.addEventListener('change', this.updateYoutubeSource.bind(this)); + this.iaCDN.addEventListener('keydown', this.updateIACDN.bind(this)); + this.syncTolerance.addEventListener('change', this.updateSyncTolerance.bind(this)); + this.liveSyncTolerance.addEventListener('change', this.updateLiveSyncTolerance.bind(this)); + this.syncDelta.addEventListener('change', this.updateSyncDelta.bind(this)); + this.chatWidthMinimum.addEventListener('change', this.updateChatWidthMinimum.bind(this)); } /** @@ -78,6 +111,11 @@ class settingsPanel extends panelObj{ */ renderSettings(){ this.youtubeSource.value = localStorage.getItem("ytPlayerType"); + this.iaCDN.value = localStorage.getItem("IACDN"); + this.syncTolerance.value = localStorage.getItem("syncTolerance"); + this.liveSyncTolerance.value = localStorage.getItem("liveSyncTolerance"); + this.syncDelta.value = localStorage.getItem("syncDelta"); + this.chatWidthMinimum.value = localStorage.getItem("chatWidthMin"); } /** @@ -87,6 +125,95 @@ class settingsPanel extends panelObj{ localStorage.setItem("ytPlayerType", this.youtubeSource.value); client.processConfig("ytPlayerType", this.youtubeSource.value); } + + /** + * Event handler for Internet Archive CDN Server input + * @param {Event} event - Event handed down by event listener + */ + updateIACDN(event){ + //If we hit enter + if(event.key == "Enter"){ + //If we have an invalid server string + if(!(this.iaCDN.value.match(/^ia[0-9]{6}\...$/g) || this.iaCDN.value == "")){ + //reset back to what was set before + this.iaCDN.value = localStorage.getItem('IACDN'); + + //BAIL! + return; + } + + localStorage.setItem("IACDN", this.iaCDN.value); + client.processConfig("IACDN", this.iaCDN.value); + } + } + + /** + * Handles Sync Tolerance Changes + */ + updateSyncTolerance(){ + //If sync tolerance was set to a negative number + if(this.syncTolerance.value < 0){ + //Reset setting back to stored value + this.syncTolerance.value = localStorage.getItem('syncTolerance'); + + //BAIL! + return; + } + + localStorage.setItem("syncTolerance", this.syncTolerance.value); + client.processConfig("syncTolerance", this.syncTolerance.value); + } + + /** + * Handles Live Sync Tolerance Changes + */ + updateLiveSyncTolerance(){ + //If sync tolerance was set to a negative number + if(this.liveSyncTolerance.value < 0){ + //Reset setting back to stored value + this.liveSyncTolerance.value = localStorage.getItem('liveSyncTolerance'); + + //BAIL! + return; + } + + localStorage.setItem("liveSyncTolerance", this.liveSyncTolerance.value); + client.processConfig("liveSyncTolerance", this.liveSyncTolerance.value); + } + + /** + * Handles Sync Delta Changes + */ + updateSyncDelta(){ + //If sync tolerance was set to a negative number + if(this.syncDelta.value < 0){ + //Reset setting back to stored value + this.syncDelta.value = localStorage.getItem('syncDelta'); + + //BAIL! + return; + } + + localStorage.setItem("syncDelta", this.syncDelta.value); + client.processConfig("syncDelta", this.syncDelta.value); + } + + /** + * Handles Chat Width minimum Changes + */ + updateChatWidthMinimum(){ + //If sync tolerance was set to a negative number + if(this.chatWidthMinimum.value < 0 || this.chatWidthMinimum > 100){ + //Reset setting back to stored value + this.syncDelta.value = localStorage.getItem('chatWidthMin'); + + //BAIL! + return; + } + + localStorage.setItem("chatWidthMin", this.chatWidthMinimum.value); + client.processConfig("chatWidthMin", this.chatWidthMinimum.value); + } } @@ -103,7 +230,7 @@ class settingsPanel extends panelObj{
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/player.html b/www/doc/client/player.html index efdac7f..6804765 100644 --- a/www/doc/client/player.html +++ b/www/doc/client/player.html @@ -1588,7 +1588,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -1676,7 +1676,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -1764,7 +1764,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -1852,7 +1852,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -1904,6 +1904,94 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m + + + + + + +

hardReload()

+ + + + + + +
+ Destroys and Re-Creates media handler +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -1962,7 +2050,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -2099,7 +2187,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -2187,7 +2275,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -2324,7 +2412,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -2686,7 +2774,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -2823,7 +2911,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -2960,7 +3048,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -3097,7 +3185,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -3185,7 +3273,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -3322,7 +3410,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
Source:
@@ -3374,7 +3462,7 @@ Might seem weird to keep this here instead of the HLS handler, but remember we m
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/player.js.html b/www/doc/client/player.js.html index 3de47cd..adbc5a9 100644 --- a/www/doc/client/player.js.html +++ b/www/doc/client/player.js.html @@ -135,19 +135,19 @@ class player{ /** * Tolerance between timestamp from server and actual media before corrective seek for pre-recorded media */ - this.syncTolerance = 0.4; + this.syncTolerance = localStorage.getItem('syncTolerance'); /** * Tolerance in livestream delay before corrective seek to live. * * Might seem weird to keep this here instead of the HLS handler, but remember we may want to support other livestream services in the future... */ - this.streamSyncTolerance = 2; + this.streamSyncTolerance = localStorage.getItem('liveSyncTolerance'); /** * Forced time to wait between sync checks, heavily decreases chance of seek-banging without reducing syncornization accuracy */ - this.syncDelta = 6; + this.syncDelta = localStorage.getItem('syncDelta'); /** * Current Player Volume @@ -220,6 +220,18 @@ class player{ this.mediaHandler = new hlsDailymotionHandler(this.client, this, data.media); //Otherwise, if we have a raw-file compatible source }else if(data.media.type == 'ia' || data.media.type == 'raw' || data.media.type == 'yt' || data.media.type == 'dm'){ + //If we're running a source from IA + if(data.media.type == 'ia'){ + //Replace specified CDN with generic URL, in-case of hard reload + data.media.rawLink = data.media.rawLink.replace(/^https(.*)archive\.org(.*)items/g, "https://archive.org/download") + + //If we have an IA source and a custom IA CDN Server set + if(data.media.type == 'ia' && localStorage.getItem("IACDN") != ""){ + //Generate and set new link + data.media.rawLink = data.media.rawLink.replace("https://archive.org/download", `https://${localStorage.getItem("IACDN")}.archive.org/0/items`); + } + } + //Create a new raw file handler for it this.mediaHandler = new rawFileHandler(client, this, data.media); //Sync to time stamp @@ -272,6 +284,27 @@ class player{ } } + /** + * Destroys and Re-Creates media handler + */ + hardReload(){ + if(this.mediaHandler != null){ + //Re-create data we'd get from server + const data = { + media: this.mediaHandler.nowPlaying, + timestamp: this.mediaHandler.getTimestamp() + } + + //End current media handler + this.end(); + + console.log(data); + + //Restart from last media handlers + this.start(data); + } + } + /** * Handles End-Media Commands from the Server */ @@ -474,7 +507,7 @@ class player{
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/playlistManager.html b/www/doc/client/playlistManager.html index 0bc1b4d..1d0ccce 100644 --- a/www/doc/client/playlistManager.html +++ b/www/doc/client/playlistManager.html @@ -3631,7 +3631,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/poppedPanel.html b/www/doc/client/poppedPanel.html index 4305c59..1803f2b 100644 --- a/www/doc/client/poppedPanel.html +++ b/www/doc/client/poppedPanel.html @@ -1442,7 +1442,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/queuePanel.html b/www/doc/client/queuePanel.html index 2347fd2..3c17906 100644 --- a/www/doc/client/queuePanel.html +++ b/www/doc/client/queuePanel.html @@ -5313,7 +5313,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/rawFileBase.html b/www/doc/client/rawFileBase.html index e0feed8..f7b27fb 100644 --- a/www/doc/client/rawFileBase.html +++ b/www/doc/client/rawFileBase.html @@ -2914,7 +2914,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/rawFileHandler.html b/www/doc/client/rawFileHandler.html index cca00c9..75a7113 100644 --- a/www/doc/client/rawFileHandler.html +++ b/www/doc/client/rawFileHandler.html @@ -2896,7 +2896,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/renamePopup.html b/www/doc/client/renamePopup.html index 83e29b5..b94cc7c 100644 --- a/www/doc/client/renamePopup.html +++ b/www/doc/client/renamePopup.html @@ -875,7 +875,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/reschedulePopup.html b/www/doc/client/reschedulePopup.html index cca142d..0aae8da 100644 --- a/www/doc/client/reschedulePopup.html +++ b/www/doc/client/reschedulePopup.html @@ -1050,7 +1050,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/schedulePopup.html b/www/doc/client/schedulePopup.html index 8255821..1706ecc 100644 --- a/www/doc/client/schedulePopup.html +++ b/www/doc/client/schedulePopup.html @@ -960,7 +960,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/settingsPanel.html b/www/doc/client/settingsPanel.html index 7890d02..7fcaff6 100644 --- a/www/doc/client/settingsPanel.html +++ b/www/doc/client/settingsPanel.html @@ -230,6 +230,68 @@ +

chatWidthMinimum

+ + + + +
+ Chat Width Minimum while Size-Locked to Media Aspect Ratio +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

client

@@ -297,6 +359,130 @@ +

iaCDN

+ + + + +
+ Internet Archive CDN Server Input +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

liveSyncTolerance

+ + + + +
+ Livestream Syncronization Tolerance Input +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

name

@@ -564,6 +750,192 @@ + +

syncDelta

+ + + + +
+ Syncronization Tolerance Delta +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

syncTolerance

+ + + + +
+ Syncronization Tolerance Input +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

youtubeSource

+ + + + +
+ Youtube Source Selector +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + @@ -928,7 +1300,7 @@
Source:
@@ -1016,7 +1388,496 @@
Source:
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

updateChatWidthMinimum()

+ + + + + + +
+ Handles Chat Width minimum Changes +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

updateIACDN(event)

+ + + + + + +
+ Event handler for Internet Archive CDN Server input +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
event + + +Event + + + + Event handed down by event listener
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

updateLiveSyncTolerance()

+ + + + + + +
+ Handles Live Sync Tolerance Changes +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

updateSyncDelta()

+ + + + + + +
+ Handles Sync Delta Changes +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

updateSyncTolerance()

+ + + + + + +
+ Handles Sync Tolerance Changes +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -1104,7 +1965,7 @@
Source:
@@ -1156,7 +2017,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/userList.html b/www/doc/client/userList.html index 1d1ecca..29f4bdd 100644 --- a/www/doc/client/userList.html +++ b/www/doc/client/userList.html @@ -1191,7 +1191,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/userlist.js.html b/www/doc/client/userlist.js.html index 0234aa8..6089037 100644 --- a/www/doc/client/userlist.js.html +++ b/www/doc/client/userlist.js.html @@ -252,7 +252,7 @@ class userList{
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/client/youtubeEmbedHandler.html b/www/doc/client/youtubeEmbedHandler.html index dc4981e..44e2470 100644 --- a/www/doc/client/youtubeEmbedHandler.html +++ b/www/doc/client/youtubeEmbedHandler.html @@ -2891,7 +2891,7 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:49 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/activeChannel.html b/www/doc/server/activeChannel.html index dc170a0..8a1e364 100644 --- a/www/doc/server/activeChannel.html +++ b/www/doc/server/activeChannel.html @@ -1218,13 +1218,13 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_activeChannel.js.html b/www/doc/server/app_channel_activeChannel.js.html index 5054c52..85ae37d 100644 --- a/www/doc/server/app_channel_activeChannel.js.html +++ b/www/doc/server/app_channel_activeChannel.js.html @@ -88,7 +88,7 @@ class activeChannel{ /** * Child Playlist Handler Object */ - this.playlistHandler = new playlistHandler(server, chanDB, this); + this.playlistHandler = new playlistHandler(server, this); /** * Child Chat Buffer Object @@ -215,13 +215,13 @@ module.exports = activeChannel;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_channelManager.js.html b/www/doc/server/app_channel_channelManager.js.html index 21502ba..b4f54c0 100644 --- a/www/doc/server/app_channel_channelManager.js.html +++ b/www/doc/server/app_channel_channelManager.js.html @@ -346,13 +346,13 @@ module.exports = channelManager;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_chat.js.html b/www/doc/server/app_channel_chat.js.html index 0b0e21b..29b3323 100644 --- a/www/doc/server/app_channel_chat.js.html +++ b/www/doc/server/app_channel_chat.js.html @@ -98,13 +98,13 @@ module.exports = chat;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_chatBuffer.js.html b/www/doc/server/app_channel_chatBuffer.js.html index df11724..58a9823 100644 --- a/www/doc/server/app_channel_chatBuffer.js.html +++ b/www/doc/server/app_channel_chatBuffer.js.html @@ -194,13 +194,13 @@ module.exports = chatBuffer;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_chatHandler.js.html b/www/doc/server/app_channel_chatHandler.js.html index 56a8b8a..a6890d3 100644 --- a/www/doc/server/app_channel_chatHandler.js.html +++ b/www/doc/server/app_channel_chatHandler.js.html @@ -378,13 +378,13 @@ module.exports = chatHandler;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_commandPreprocessor.js.html b/www/doc/server/app_channel_commandPreprocessor.js.html index 39c90f2..f89d27f 100644 --- a/www/doc/server/app_channel_commandPreprocessor.js.html +++ b/www/doc/server/app_channel_commandPreprocessor.js.html @@ -482,13 +482,13 @@ module.exports = commandPreprocessor;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_connectedUser.js.html b/www/doc/server/app_channel_connectedUser.js.html index f61df5d..9e065d8 100644 --- a/www/doc/server/app_channel_connectedUser.js.html +++ b/www/doc/server/app_channel_connectedUser.js.html @@ -360,13 +360,13 @@ module.exports = connectedUser;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_media_media.js.html b/www/doc/server/app_channel_media_media.js.html index 77f92ca..f85f6a9 100644 --- a/www/doc/server/app_channel_media_media.js.html +++ b/www/doc/server/app_channel_media_media.js.html @@ -104,13 +104,13 @@ module.exports = media;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_media_playlistHandler.js.html b/www/doc/server/app_channel_media_playlistHandler.js.html index 1e5d0c5..4e7ae08 100644 --- a/www/doc/server/app_channel_media_playlistHandler.js.html +++ b/www/doc/server/app_channel_media_playlistHandler.js.html @@ -1179,13 +1179,13 @@ module.exports = playlistHandler;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_media_queue.js.html b/www/doc/server/app_channel_media_queue.js.html index b3c1e64..62b12db 100644 --- a/www/doc/server/app_channel_media_queue.js.html +++ b/www/doc/server/app_channel_media_queue.js.html @@ -1818,13 +1818,13 @@ module.exports = queue;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_media_queuedMedia.js.html b/www/doc/server/app_channel_media_queuedMedia.js.html index 2574a84..ff2434c 100644 --- a/www/doc/server/app_channel_media_queuedMedia.js.html +++ b/www/doc/server/app_channel_media_queuedMedia.js.html @@ -174,13 +174,13 @@ module.exports = queuedMedia;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/app_channel_tokebot.js.html b/www/doc/server/app_channel_tokebot.js.html index 34f5dcf..6816142 100644 --- a/www/doc/server/app_channel_tokebot.js.html +++ b/www/doc/server/app_channel_tokebot.js.html @@ -293,13 +293,13 @@ module.exports = tokebot;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/channelManager.html b/www/doc/server/channelManager.html index 76ffbba..101b81d 100644 --- a/www/doc/server/channelManager.html +++ b/www/doc/server/channelManager.html @@ -2175,13 +2175,13 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/chat.html b/www/doc/server/chat.html index 81d5896..53a0ebe 100644 --- a/www/doc/server/chat.html +++ b/www/doc/server/chat.html @@ -699,13 +699,13 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/chatBuffer.html b/www/doc/server/chatBuffer.html index cec6f96..d52127b 100644 --- a/www/doc/server/chatBuffer.html +++ b/www/doc/server/chatBuffer.html @@ -1323,13 +1323,13 @@ Left here since it seems like good form anywho, since this would be a private, o
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/chatHandler.html b/www/doc/server/chatHandler.html index a5705fb..7d120e7 100644 --- a/www/doc/server/chatHandler.html +++ b/www/doc/server/chatHandler.html @@ -3870,13 +3870,13 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/commandPreprocessor.html b/www/doc/server/commandPreprocessor.html index c2eb0f5..75c0e76 100644 --- a/www/doc/server/commandPreprocessor.html +++ b/www/doc/server/commandPreprocessor.html @@ -1492,13 +1492,13 @@ These arrays are used to handle further command/chat processing
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/commandProcessor.html b/www/doc/server/commandProcessor.html index d44d232..cba8ebe 100644 --- a/www/doc/server/commandProcessor.html +++ b/www/doc/server/commandProcessor.html @@ -1825,13 +1825,13 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/connectedUser.html b/www/doc/server/connectedUser.html index 4482395..05fe784 100644 --- a/www/doc/server/connectedUser.html +++ b/www/doc/server/connectedUser.html @@ -2435,13 +2435,13 @@ Having to crawl through these sockets is that. Because the other ways seem more
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/global.html b/www/doc/server/global.html index e1a32c2..378d9bd 100644 --- a/www/doc/server/global.html +++ b/www/doc/server/global.html @@ -2218,6 +2218,737 @@ This is important, as reducing authentication endpoints reduces attack surface. + + + + + + +

consoleWarn(string)

+ + + + + + +
+ Prints warning text to server console +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
string + + +String + + + + String to print to console
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

dumpError(err, date)

+ + + + + + +
+ Dumps unexpected server crashes to dedicated log files +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
err + + +Error + + + + error to dump to file
date + + +Date + + + + Date of error, defaults to now
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

errorHandler(res, msg, type, status) → {Express.Response}

+ + + + + + +
+ Main error handling function +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
res + + +Express.Response + + + + Response being sent out to the client who caused the issue
msg + + +String + + + + Error message to send the client
type + + +String + + + + Error type to send back to the client
status + + +Number + + + + HTTP(s) Status Code to send back to the client
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ If we have a usable Express Response object, return it back after it's been cashed +
+ + + +
+
+ Type +
+
+ +Express.Response + + +
+
+ + + + + + + + + + + + + +

errorMiddleware(err, req, res, next)

+ + + + + + +
+ Basic error-handling middleware to ensure we're not dumping stack traces to the client, as that would be insecure +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
err + + +Error + + + + Error to handle
req + + +Express.Request + + + + Express Request
res + + +Express.Response + + + + Express Response
next + + +function + + + + Next function in the Express middleware chain (Not that it's getting called XP)
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -2386,6 +3117,350 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects +

exceptionHandler(res, err)

+ + + + + + +
+ Handles exceptions which where directly the fault of user action >:( +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
res + + +Express.Response + + + + Express Response object to bitch at
err + + +Error + + + + Error created by the jerk in question
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

exceptionSmith(msg, type) → {Error}

+ + + + + + +
+ Creates and returns a custom exception, tagged as a 'custom' exception, using the 'custom' boolean property. +This is used to denote that this error was generated on purpose, with a human readable message, that can be securely sent to the client. +Unexpected exceptions should only be logged internally, however, as they may contain sensitive data. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + +String + + + + Error message to send the client
type + + +String + + + + Error type to send back to the client
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The exception to smith +
+ + + +
+
+ Type +
+
+ +Error + + +
+
+ + + + + + + + + + + + +

fetchMetadata(fullID, title) → {Array}

@@ -4180,6 +5255,143 @@ Provides a basic level of privacy by only logging salted hashes of IP's + + + + + + +

localExceptionHandler(err)

+ + + + + + +
+ Handles local exceptions which where not directly created by user interaction +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
err + + +Error + + + + Exception to handle
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -5176,6 +6388,575 @@ Warns server admin against unsafe config options. + + + + + + +

socketCriticalExceptionHandler(socket, err) → {Boolean}

+ + + + + + +
+ Generates error messages and drops connection for critical errors caused by socket.io interaction +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
socket + + +Socket + + + + Socket error originated from
err + + +Error + + + + Error created by the jerk in question
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - Passthrough from socket.disconnect +
+ + + +
+
+ Type +
+
+ +Boolean + + +
+
+ + + + + + + + + + + + + +

socketErrorHandler(socket, msg, type) → {Boolean}

+ + + + + + +
+ Basic error-handling for socket.io so we don't just silently swallow errors. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
socket + + +Socket + + + + Socket error originated from
msg + + +String + + + + Error message to send the client
type + + +String + + + + Error type to send back to the client
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - Passthrough from socket.emit +
+ + + +
+
+ Type +
+
+ +Boolean + + +
+
+ + + + + + + + + + + + + +

socketExceptionHandler(socket, err) → {Boolean}

+ + + + + + +
+ Generates error messages for simple errors generated by socket.io interaction +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
socket + + +Socket + + + + Socket error originated from
err + + +Error + + + + Error created by the jerk in question
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - Passthrough from socket.emit +
+ + + +
+
+ Type +
+
+ +Boolean + + +
+
+ + + + + + + @@ -5750,13 +7531,13 @@ Warns server admin against unsafe config options.
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/index.html b/www/doc/server/index.html index 78830f0..f66d8ba 100644 --- a/www/doc/server/index.html +++ b/www/doc/server/index.html @@ -81,13 +81,13 @@ This new codebase intends to solve the following issues with the current CyTube
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/media.html b/www/doc/server/media.html index 6ae18e4..8a084b1 100644 --- a/www/doc/server/media.html +++ b/www/doc/server/media.html @@ -784,13 +784,13 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/playlistHandler.html b/www/doc/server/playlistHandler.html index ffebf64..a8b2db8 100644 --- a/www/doc/server/playlistHandler.html +++ b/www/doc/server/playlistHandler.html @@ -5230,13 +5230,13 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/queue.html b/www/doc/server/queue.html index ea579b9..c9d5ef5 100644 --- a/www/doc/server/queue.html +++ b/www/doc/server/queue.html @@ -6671,13 +6671,13 @@ Called auto-magically by the Synchronization Timer
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/queuedMedia.html b/www/doc/server/queuedMedia.html index 1216275..80f4833 100644 --- a/www/doc/server/queuedMedia.html +++ b/www/doc/server/queuedMedia.html @@ -1713,13 +1713,13 @@
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_channel_channelBanSchema.js.html b/www/doc/server/schemas_channel_channelBanSchema.js.html index cf51fc8..0c153ee 100644 --- a/www/doc/server/schemas_channel_channelBanSchema.js.html +++ b/www/doc/server/schemas_channel_channelBanSchema.js.html @@ -95,13 +95,13 @@ module.exports = channelBanSchema;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_channel_channelPermissionSchema.js.html b/www/doc/server/schemas_channel_channelPermissionSchema.js.html index ec2d7b6..e38a92b 100644 --- a/www/doc/server/schemas_channel_channelPermissionSchema.js.html +++ b/www/doc/server/schemas_channel_channelPermissionSchema.js.html @@ -163,13 +163,13 @@ module.exports = channelPermissionSchema;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_channel_channelSchema.js.html b/www/doc/server/schemas_channel_channelSchema.js.html index 35d0a91..74bd89b 100644 --- a/www/doc/server/schemas_channel_channelSchema.js.html +++ b/www/doc/server/schemas_channel_channelSchema.js.html @@ -928,13 +928,13 @@ module.exports = mongoose.model("channel", channelSchema);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_channel_chatSchema.js.html b/www/doc/server/schemas_channel_chatSchema.js.html index e60700a..0c1b259 100644 --- a/www/doc/server/schemas_channel_chatSchema.js.html +++ b/www/doc/server/schemas_channel_chatSchema.js.html @@ -90,13 +90,13 @@ module.exports = chatSchema;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_channel_media_mediaSchema.js.html b/www/doc/server/schemas_channel_media_mediaSchema.js.html index aebddd9..3712212 100644 --- a/www/doc/server/schemas_channel_media_mediaSchema.js.html +++ b/www/doc/server/schemas_channel_media_mediaSchema.js.html @@ -90,13 +90,13 @@ module.exports = mediaSchema;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_channel_media_playlistMediaSchema.js.html b/www/doc/server/schemas_channel_media_playlistMediaSchema.js.html index 960fdbe..54b985e 100644 --- a/www/doc/server/schemas_channel_media_playlistMediaSchema.js.html +++ b/www/doc/server/schemas_channel_media_playlistMediaSchema.js.html @@ -118,13 +118,13 @@ module.exports = mediaSchema.discriminator('saved', playlistMediaProperties);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_channel_media_playlistSchema.js.html b/www/doc/server/schemas_channel_media_playlistSchema.js.html index 0947ca1..8d54516 100644 --- a/www/doc/server/schemas_channel_media_playlistSchema.js.html +++ b/www/doc/server/schemas_channel_media_playlistSchema.js.html @@ -168,13 +168,13 @@ module.exports = playlistSchema;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_channel_media_queuedMediaSchema.js.html b/www/doc/server/schemas_channel_media_queuedMediaSchema.js.html index 52e8741..d81d4f5 100644 --- a/www/doc/server/schemas_channel_media_queuedMediaSchema.js.html +++ b/www/doc/server/schemas_channel_media_queuedMediaSchema.js.html @@ -107,13 +107,13 @@ module.exports = mediaSchema.discriminator('queued', queuedProperties);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_emoteSchema.js.html b/www/doc/server/schemas_emoteSchema.js.html index 08ae363..1d30a63 100644 --- a/www/doc/server/schemas_emoteSchema.js.html +++ b/www/doc/server/schemas_emoteSchema.js.html @@ -158,13 +158,13 @@ module.exports = mongoose.model("emote", emoteSchema);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_flairSchema.js.html b/www/doc/server/schemas_flairSchema.js.html index 6add2c3..ea28ff4 100644 --- a/www/doc/server/schemas_flairSchema.js.html +++ b/www/doc/server/schemas_flairSchema.js.html @@ -112,13 +112,13 @@ module.exports = mongoose.model("flair", flairSchema);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_permissionSchema.js.html b/www/doc/server/schemas_permissionSchema.js.html index d368671..39a48e7 100644 --- a/www/doc/server/schemas_permissionSchema.js.html +++ b/www/doc/server/schemas_permissionSchema.js.html @@ -350,13 +350,13 @@ module.exports = mongoose.model("permissions", permissionSchema);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_statSchema.js.html b/www/doc/server/schemas_statSchema.js.html index 37ce9f9..eacaf80 100644 --- a/www/doc/server/schemas_statSchema.js.html +++ b/www/doc/server/schemas_statSchema.js.html @@ -234,13 +234,13 @@ module.exports = mongoose.model("statistics", statSchema);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_tokebot_tokeCommandSchema.js.html b/www/doc/server/schemas_tokebot_tokeCommandSchema.js.html index 6ff9741..8413927 100644 --- a/www/doc/server/schemas_tokebot_tokeCommandSchema.js.html +++ b/www/doc/server/schemas_tokebot_tokeCommandSchema.js.html @@ -154,13 +154,13 @@ module.exports = mongoose.model("tokeCommand", tokeCommandSchema);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_user_emailChangeSchema.js.html b/www/doc/server/schemas_user_emailChangeSchema.js.html index f4b10e2..cbae2e1 100644 --- a/www/doc/server/schemas_user_emailChangeSchema.js.html +++ b/www/doc/server/schemas_user_emailChangeSchema.js.html @@ -216,13 +216,13 @@ module.exports = mongoose.model("emailChange", emailChangeSchema);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_user_passwordResetSchema.js.html b/www/doc/server/schemas_user_passwordResetSchema.js.html index 482a004..67ffc94 100644 --- a/www/doc/server/schemas_user_passwordResetSchema.js.html +++ b/www/doc/server/schemas_user_passwordResetSchema.js.html @@ -198,13 +198,13 @@ module.exports = mongoose.model("passwordReset", passwordResetSchema);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_user_userBanSchema.js.html b/www/doc/server/schemas_user_userBanSchema.js.html index 7b8e6b5..aa94c9d 100644 --- a/www/doc/server/schemas_user_userBanSchema.js.html +++ b/www/doc/server/schemas_user_userBanSchema.js.html @@ -515,13 +515,13 @@ module.exports = mongoose.model("userBan", userBanSchema);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/schemas_user_userSchema.js.html b/www/doc/server/schemas_user_userSchema.js.html index 4faa7bf..d14856e 100644 --- a/www/doc/server/schemas_user_userSchema.js.html +++ b/www/doc/server/schemas_user_userSchema.js.html @@ -882,13 +882,13 @@ module.exports.userModel = mongoose.model("user", userSchema);
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/tokebot.html b/www/doc/server/tokebot.html index bc50283..243dc15 100644 --- a/www/doc/server/tokebot.html +++ b/www/doc/server/tokebot.html @@ -1397,13 +1397,13 @@ I would now, but I don't want to break shit in a comment-only commit.
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_altchaUtils.js.html b/www/doc/server/utils_altchaUtils.js.html index 50a509d..9eea7b0 100644 --- a/www/doc/server/utils_altchaUtils.js.html +++ b/www/doc/server/utils_altchaUtils.js.html @@ -112,13 +112,13 @@ module.exports.verify = async function(payload, uniqueSecret = ''){
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_configCheck.js.html b/www/doc/server/utils_configCheck.js.html index 31a96d4..54d8ec1 100644 --- a/www/doc/server/utils_configCheck.js.html +++ b/www/doc/server/utils_configCheck.js.html @@ -102,13 +102,13 @@ module.exports.securityCheck = function(){
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_hashUtils.js.html b/www/doc/server/utils_hashUtils.js.html index f683cb3..4928c8c 100644 --- a/www/doc/server/utils_hashUtils.js.html +++ b/www/doc/server/utils_hashUtils.js.html @@ -97,13 +97,13 @@ module.exports.hashIP = function(ip){
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_linkUtils.js.html b/www/doc/server/utils_linkUtils.js.html index 021b1a9..a2a1f12 100644 --- a/www/doc/server/utils_linkUtils.js.html +++ b/www/doc/server/utils_linkUtils.js.html @@ -140,13 +140,13 @@ module.exports.markLink = async function(link){
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_loggerUtils.js.html b/www/doc/server/utils_loggerUtils.js.html index a818d99..b4fd6fa 100644 --- a/www/doc/server/utils_loggerUtils.js.html +++ b/www/doc/server/utils_loggerUtils.js.html @@ -42,8 +42,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.*/ -//Node Imports -const fs = require('node:fs/promises') +//Node +const fs = require('node:fs/promises'); //Config const config = require('../../config.json'); @@ -196,14 +196,20 @@ module.exports.errorMiddleware = function(err, req, res, next){ module.exports.errorHandler(res, err.message, reason, err.status); } +/** + * Dumps unexpected server crashes to dedicated log files + * @param {Error} err - error to dump to file + * @param {Date} date - Date of error, defaults to now + */ module.exports.dumpError = function(err, date = new Date()){ try{ - console.log(err); - console.log(JSON.stringify(err, null, 2)); - fs.writeFile(`log/crash/${date.getTime()}.log`, JSON.stringify(err, null, 2)); - }catch(err){ - module.exports.consoleWarn("Hey Dawg, I Heard you liked errors, so I got you an error while dumping your error to the error logs:"); + const content = `Error Date: ${date.toLocaleString()} (UTC-${date.getTimezoneOffset()/60})\nError Type: ${err.name}\nError Msg:${err.message}\nStack Trace:\n\n${err.stack}`; + + fs.writeFile(`log/crash/${date.getTime()}.log`, content); + }catch(doubleErr){ + module.exports.consoleWarn("Yo Dawg, I herd you like errors, so I put an error in your error dump, so you can dump while you dump:"); module.exports.consoleWarn(err); + module.exports.consoleWarn(doubleErr); } } @@ -215,13 +221,13 @@ module.exports.dumpError = function(err, date = new Date()){
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:23:36 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_mailUtils.js.html b/www/doc/server/utils_mailUtils.js.html index f73cd30..554ffb8 100644 --- a/www/doc/server/utils_mailUtils.js.html +++ b/www/doc/server/utils_mailUtils.js.html @@ -134,13 +134,13 @@ module.exports.sendAddressVerification = async function(requestDB, userDB, newEm
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_media_internetArchiveUtils.js.html b/www/doc/server/utils_media_internetArchiveUtils.js.html index 063a1e0..1478f36 100644 --- a/www/doc/server/utils_media_internetArchiveUtils.js.html +++ b/www/doc/server/utils_media_internetArchiveUtils.js.html @@ -148,13 +148,13 @@ module.exports.fetchMetadata = async function(fullID, title){
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_media_yanker.js.html b/www/doc/server/utils_media_yanker.js.html index 68bd14e..29324f9 100644 --- a/www/doc/server/utils_media_yanker.js.html +++ b/www/doc/server/utils_media_yanker.js.html @@ -187,13 +187,13 @@ module.exports.getMediaType = async function(url){
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_media_ytdlpUtils.js.html b/www/doc/server/utils_media_ytdlpUtils.js.html index e7a2e2b..31aa839 100644 --- a/www/doc/server/utils_media_ytdlpUtils.js.html +++ b/www/doc/server/utils_media_ytdlpUtils.js.html @@ -180,13 +180,13 @@ async function ytdlpFetch(link, format = 'b'){
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_regexUtils.js.html b/www/doc/server/utils_regexUtils.js.html index bd5e072..00b0571 100644 --- a/www/doc/server/utils_regexUtils.js.html +++ b/www/doc/server/utils_regexUtils.js.html @@ -63,13 +63,13 @@ module.exports.escapeRegex = function(string){
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_scheduler.js.html b/www/doc/server/utils_scheduler.js.html index 2a53346..3474b81 100644 --- a/www/doc/server/utils_scheduler.js.html +++ b/www/doc/server/utils_scheduler.js.html @@ -99,13 +99,13 @@ module.exports.kickoff = function(){
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:48 GMT-0400 (Eastern Daylight Time)
diff --git a/www/doc/server/utils_sessionUtils.js.html b/www/doc/server/utils_sessionUtils.js.html index 40a5087..9ecd5b8 100644 --- a/www/doc/server/utils_sessionUtils.js.html +++ b/www/doc/server/utils_sessionUtils.js.html @@ -230,13 +230,13 @@ module.exports.maxAttempts = maxAttempts;
- Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 01:35:59 GMT-0400 (Eastern Daylight Time) + Documentation generated by JSDoc 4.0.4 on Sat Sep 06 2025 10:33:47 GMT-0400 (Eastern Daylight Time)
diff --git a/www/js/channel/channel.js b/www/js/channel/channel.js index 3e4ff1a..b8b5305 100644 --- a/www/js/channel/channel.js +++ b/www/js/channel/channel.js @@ -236,6 +236,46 @@ class channel{ this.player.hardReload(); } + return; + case 'syncTolerance': + //If the player isn't loaded + if(this.player == null){ + //We're fuckin' done here + return; + } + + //Set syncronization tolerance + this.player.syncTolerance = value; + return; + case 'liveSyncTolerance': + //If the player isn't loaded + if(this.player == null){ + //We're fuckin' done here + return; + } + + //Set syncronization tolerance + this.player.streamSyncTolerance = value; + return; + case 'syncDelta': + //If the player isn't loaded + if(this.player == null){ + //We're fuckin' done here + return; + } + + //Set syncronization delta + this.player.syncDelta = value; + return; + case 'chatWidthMin': + //If the chat isn't loaded + if(this.chatBox == null){ + //We're fuckin' done here + return; + } + + //Set Chat Box Width minimum while Locked to Aspect-Ratio + this.chatBox.chatWidthMinimum = value / 100; return; } } @@ -245,7 +285,11 @@ class channel{ */ static defaultConfig = new Map([ ["ytPlayerType","raw"], - ["IACDN",""] + ["IACDN",""], + ["syncTolerance",0.4], + ["liveSyncTolerance", 2], + ["syncDelta", 6], + ["chatWidthMin", 20] ]); } diff --git a/www/js/channel/chat.js b/www/js/channel/chat.js index a9f475d..abca6f8 100644 --- a/www/js/channel/chat.js +++ b/www/js/channel/chat.js @@ -38,6 +38,11 @@ class chatBox{ */ this.autoScroll = true; + /** + * Chat-Width Minimum while sized to media Aspect-Ratio + */ + this.chatWidthMinimum = localStorage.getItem('chatWidthMin') / 100; + /** * Chat Buffer Scroll Top on last scroll */ @@ -500,10 +505,10 @@ L /** var targetVidWidth = this.client.player.getRatio() * this.chatPanel.getBoundingClientRect().height; const targetChatWidth = window.innerWidth - targetVidWidth; //This should be changeable in settings later on, for now it defaults to 20% - const limit = window.innerWidth * .2; + const limit = window.innerWidth * this.chatWidthMinimum; - //Set width to target or 20vh depending on whether or not we've hit the width limit - this.chatPanel.style.flexBasis = targetChatWidth > limit ? `${targetChatWidth}px` : '20vh'; + //Set width to target or 20vw depending on whether or not we've hit the width limit + this.chatPanel.style.flexBasis = targetChatWidth > limit ? `${targetChatWidth}px` : `${this.chatWidthMinimum * 100}vw`; //Fix busted layout var pageBreak = document.body.scrollWidth - document.body.getBoundingClientRect().width; diff --git a/www/js/channel/mediaHandler.js b/www/js/channel/mediaHandler.js index 0fde0d1..4c4f491 100644 --- a/www/js/channel/mediaHandler.js +++ b/www/js/channel/mediaHandler.js @@ -759,7 +759,7 @@ class hlsLiveStreamHandler extends hlsBase{ super.onBuffer(event); - //If we're synced by the end of buffering + //If we're supposed to be synced by the end of buffering if(this.player.syncLock){ //Throw flag to manually sync since this works entirely differently from literally every other fucking media source this.reSync = true; diff --git a/www/js/channel/panels/settingsPanel.js b/www/js/channel/panels/settingsPanel.js index d8ff081..7f6b707 100644 --- a/www/js/channel/panels/settingsPanel.js +++ b/www/js/channel/panels/settingsPanel.js @@ -40,7 +40,27 @@ class settingsPanel extends panelObj{ /** * Internet Archive CDN Server Input */ - this.IACDNInput = this.panelDocument.querySelector("#settings-panel-ia-server input"); + this.iaCDN = this.panelDocument.querySelector("#settings-panel-ia-server input"); + + /** + * Syncronization Tolerance Input + */ + this.syncTolerance = this.panelDocument.querySelector("#settings-panel-sync-tolerance input"); + + /** + * Livestream Syncronization Tolerance Input + */ + this.liveSyncTolerance = this.panelDocument.querySelector("#settings-panel-live-sync-tolerance input"); + + /** + * Syncronization Tolerance Delta + */ + this.syncDelta = this.panelDocument.querySelector("#settings-panel-sync-delta input"); + + /** + * Chat Width Minimum while Size-Locked to Media Aspect Ratio + */ + this.chatWidthMinimum = this.panelDocument.querySelector("#settings-panel-min-chat-width input"); this.renderSettings(); this.setupInput(); @@ -51,7 +71,11 @@ class settingsPanel extends panelObj{ */ setupInput(){ this.youtubeSource.addEventListener('change', this.updateYoutubeSource.bind(this)); - this.IACDNInput.addEventListener('keydown', this.updateIACDN.bind(this)); + this.iaCDN.addEventListener('keydown', this.updateIACDN.bind(this)); + this.syncTolerance.addEventListener('change', this.updateSyncTolerance.bind(this)); + this.liveSyncTolerance.addEventListener('change', this.updateLiveSyncTolerance.bind(this)); + this.syncDelta.addEventListener('change', this.updateSyncDelta.bind(this)); + this.chatWidthMinimum.addEventListener('change', this.updateChatWidthMinimum.bind(this)); } /** @@ -59,7 +83,11 @@ class settingsPanel extends panelObj{ */ renderSettings(){ this.youtubeSource.value = localStorage.getItem("ytPlayerType"); - this.IACDNInput.value = localStorage.getItem("IACDN"); + this.iaCDN.value = localStorage.getItem("IACDN"); + this.syncTolerance.value = localStorage.getItem("syncTolerance"); + this.liveSyncTolerance.value = localStorage.getItem("liveSyncTolerance"); + this.syncDelta.value = localStorage.getItem("syncDelta"); + this.chatWidthMinimum.value = localStorage.getItem("chatWidthMin"); } /** @@ -78,16 +106,84 @@ class settingsPanel extends panelObj{ //If we hit enter if(event.key == "Enter"){ //If we have an invalid server string - if(!(this.IACDNInput.value.match(/^ia[0-9]{6}\...$/g) || this.IACDNInput.value == "")){ + if(!(this.iaCDN.value.match(/^ia[0-9]{6}\...$/g) || this.iaCDN.value == "")){ //reset back to what was set before - this.IACDNInput.value = localStorage.getItem('IACDN'); + this.iaCDN.value = localStorage.getItem('IACDN'); //BAIL! return; } - localStorage.setItem("IACDN", this.IACDNInput.value); - client.processConfig("IACDN", this.IACDNInput.value); + localStorage.setItem("IACDN", this.iaCDN.value); + client.processConfig("IACDN", this.iaCDN.value); } } + + /** + * Handles Sync Tolerance Changes + */ + updateSyncTolerance(){ + //If sync tolerance was set to a negative number + if(this.syncTolerance.value < 0){ + //Reset setting back to stored value + this.syncTolerance.value = localStorage.getItem('syncTolerance'); + + //BAIL! + return; + } + + localStorage.setItem("syncTolerance", this.syncTolerance.value); + client.processConfig("syncTolerance", this.syncTolerance.value); + } + + /** + * Handles Live Sync Tolerance Changes + */ + updateLiveSyncTolerance(){ + //If sync tolerance was set to a negative number + if(this.liveSyncTolerance.value < 0){ + //Reset setting back to stored value + this.liveSyncTolerance.value = localStorage.getItem('liveSyncTolerance'); + + //BAIL! + return; + } + + localStorage.setItem("liveSyncTolerance", this.liveSyncTolerance.value); + client.processConfig("liveSyncTolerance", this.liveSyncTolerance.value); + } + + /** + * Handles Sync Delta Changes + */ + updateSyncDelta(){ + //If sync tolerance was set to a negative number + if(this.syncDelta.value < 0){ + //Reset setting back to stored value + this.syncDelta.value = localStorage.getItem('syncDelta'); + + //BAIL! + return; + } + + localStorage.setItem("syncDelta", this.syncDelta.value); + client.processConfig("syncDelta", this.syncDelta.value); + } + + /** + * Handles Chat Width minimum Changes + */ + updateChatWidthMinimum(){ + //If sync tolerance was set to a negative number + if(this.chatWidthMinimum.value < 0 || this.chatWidthMinimum > 100){ + //Reset setting back to stored value + this.syncDelta.value = localStorage.getItem('chatWidthMin'); + + //BAIL! + return; + } + + localStorage.setItem("chatWidthMin", this.chatWidthMinimum.value); + client.processConfig("chatWidthMin", this.chatWidthMinimum.value); + } } \ No newline at end of file diff --git a/www/js/channel/player.js b/www/js/channel/player.js index ec218f0..fb117c6 100644 --- a/www/js/channel/player.js +++ b/www/js/channel/player.js @@ -107,19 +107,19 @@ class player{ /** * Tolerance between timestamp from server and actual media before corrective seek for pre-recorded media */ - this.syncTolerance = 0.4; + this.syncTolerance = localStorage.getItem('syncTolerance'); /** * Tolerance in livestream delay before corrective seek to live. * * Might seem weird to keep this here instead of the HLS handler, but remember we may want to support other livestream services in the future... */ - this.streamSyncTolerance = 2; + this.streamSyncTolerance = localStorage.getItem('liveSyncTolerance'); /** * Forced time to wait between sync checks, heavily decreases chance of seek-banging without reducing syncornization accuracy */ - this.syncDelta = 6; + this.syncDelta = localStorage.getItem('syncDelta'); /** * Current Player Volume