aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus <heckyel@hyperbola.info>2025-03-08 16:39:37 -0500
committerJesus <heckyel@hyperbola.info>2025-03-08 16:39:37 -0500
commit03451fb8ae0d6d9d8affee715627e718244edcaf (patch)
tree3cc535830b933ea99f49b7d77e9464cd669dec58
parente45c3fd48b1fcf7ae8cdaf7694d8b6df5f9d2836 (diff)
downloadyt-local-03451fb8ae0d6d9d8affee715627e718244edcaf.tar.lz
yt-local-03451fb8ae0d6d9d8affee715627e718244edcaf.tar.xz
yt-local-03451fb8ae0d6d9d8affee715627e718244edcaf.zip
fix: prevent error when closing avMerge if not a function
-rw-r--r--youtube/static/js/watch.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube/static/js/watch.js b/youtube/static/js/watch.js
index 95d9fa7..00803cf 100644
--- a/youtube/static/js/watch.js
+++ b/youtube/static/js/watch.js
@@ -5,8 +5,9 @@ function changeQuality(selection) {
let videoPaused = video.paused;
let videoSpeed = video.playbackRate;
let srcInfo;
- if (avMerge)
+ if (avMerge && typeof avMerge.close === 'function') {
avMerge.close();
+ }
if (selection.type == 'uni'){
srcInfo = data['uni_sources'][selection.index];
video.src = srcInfo.url;