From cc48729d8a3ae3cc3be6cb2c709b7e94b0ea120b Mon Sep 17 00:00:00 2001 From: steveseguin Date: Mon, 17 Apr 2023 20:59:50 -0400 Subject: [PATCH] improving the bitrate for scene/directo switching --- index.html | 2 +- lib.js | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 87c5cf5..7d159a2 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@ - + diff --git a/lib.js b/lib.js index 5008d09..97cd439 100644 --- a/lib.js +++ b/lib.js @@ -3455,6 +3455,8 @@ function hideHomeCheck(){ } } +// toggleQualityDirector(1200, this.dataset.UUID, this) + function switchModes(state=null){ if (state===null){ session.switchMode = !session.switchMode; @@ -3522,6 +3524,8 @@ function switchModes(state=null){ } } + + applyQualityDirector(); } } @@ -29445,7 +29449,15 @@ function sendChatMessage(chatMsg = false, bc = false) { // filtered + visual return true; } -function toggleQualityDirector(bitrate, UUID, ele = null) { // ele is specific to the button in the director's room + +function applyQualityDirector() { // lets revert back to the director's quality settings after viewing the scene + var eles = document.querySelectorAll('#guestFeeds button.pressed[data-action-type="change-quality1"],#guestFeeds button.pressed[data-action-type="change-quality2"],#guestFeeds button.pressed[data-action-type="change-quality3"]'); + eles.forEach(ele =>{ + ele.click(); + }); +} + +function toggleQualityDirector(bitrate, UUID, ele) { // ele is specific to the button in the director's room var eles = ele.parentNode.childNodes; for (var i=0;i