diff options
author | Jesus <heckyel@hyperbola.info> | 2025-03-08 16:39:37 -0500 |
---|---|---|
committer | Jesus <heckyel@hyperbola.info> | 2025-03-08 16:39:37 -0500 |
commit | 03451fb8ae0d6d9d8affee715627e718244edcaf (patch) | |
tree | 3cc535830b933ea99f49b7d77e9464cd669dec58 /youtube/static/js/watch.js | |
parent | e45c3fd48b1fcf7ae8cdaf7694d8b6df5f9d2836 (diff) | |
download | yt-local-03451fb8ae0d6d9d8affee715627e718244edcaf.tar.lz yt-local-03451fb8ae0d6d9d8affee715627e718244edcaf.tar.xz yt-local-03451fb8ae0d6d9d8affee715627e718244edcaf.zip |
fix: prevent error when closing avMerge if not a function
Diffstat (limited to 'youtube/static/js/watch.js')
-rw-r--r-- | youtube/static/js/watch.js | 3 |
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; |