Skip to content

Add setting to prevent Video quality drop#638

Closed
MaxKruse wants to merge 1 commit into
SevenTV:masterfrom
MaxKruse:master
Closed

Add setting to prevent Video quality drop#638
MaxKruse wants to merge 1 commit into
SevenTV:masterfrom
MaxKruse:master

Conversation

@MaxKruse
Copy link
Copy Markdown

implements #628. since there wasnt any feedback, i just went ahead and used the linked code.

no i18n yet

document.addEventListener(
"visibilitychange",
(e) => {
e.stopImmediatePropagation();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good solution as it would prevent any other visibilitychange listeners from functioning. This includes one used by the Extension to pause chat in an out-of-focus state.

} else {
try {
document.removeEventListener("visibilitychange", (e) => {
e.stopImmediatePropagation();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good solution as it would prevent any other visibilitychange listeners from functioning. This includes one used by the Extension to pause chat in an out-of-focus state.

Comment on lines +78 to +83
{
id: "video",
kind: "config",
configEffect: ["general.hd-video.enabled"],
title: t("onboarding.config_question.video"),
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an option relevant enough to be prompted during onboarding

watchEffect(() => {
if (enableHDVideo.value) {
try {
document.addEventListener(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This listener is never removed.

}
} else {
try {
document.removeEventListener("visibilitychange", (e) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not remove anything as it creates a new function with its own identity.


<script lang="ts">
export const config = [
declareConfig("general.hd-video.enabled", "TOGGLE", {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: config key

Suggested change
declareConfig("general.hd-video.enabled", "TOGGLE", {
declareConfig("general.force_hd_video", "TOGGLE", {

@AnatoleAM
Copy link
Copy Markdown
Contributor

Closing as stale

@AnatoleAM AnatoleAM closed this Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants