fix: prevent error when closing avMerge if not a function
This commit is contained in:
parent
e45c3fd48b
commit
03451fb8ae
@ -5,8 +5,9 @@ function changeQuality(selection) {
|
|||||||
let videoPaused = video.paused;
|
let videoPaused = video.paused;
|
||||||
let videoSpeed = video.playbackRate;
|
let videoSpeed = video.playbackRate;
|
||||||
let srcInfo;
|
let srcInfo;
|
||||||
if (avMerge)
|
if (avMerge && typeof avMerge.close === 'function') {
|
||||||
avMerge.close();
|
avMerge.close();
|
||||||
|
}
|
||||||
if (selection.type == 'uni'){
|
if (selection.type == 'uni'){
|
||||||
srcInfo = data['uni_sources'][selection.index];
|
srcInfo = data['uni_sources'][selection.index];
|
||||||
video.src = srcInfo.url;
|
video.src = srcInfo.url;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user