mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
bugfix
This commit is contained in:
1 parent
151290d3ae
commit
bf740f6de9
4 files changed
+21
-1
No files matched your search
@@ -232,6 +232,10 @@
|
||||
});
|
||||
}
|
||||
function getExt(url) {
|
||||
if (url.includes('?')) {
|
||||
return getExt(url.split('?')[0]);
|
||||
}
|
||||
|
||||
return url.trim().toLowerCase().split('.').pop();
|
||||
}
|
||||
|
||||
@@ -927,6 +931,7 @@
|
||||
this.art = art;
|
||||
|
||||
if (this.art.option.subtitle) {
|
||||
errorHandle(getExt(this.art.option.subtitle) === 'vtt', "'subtitle' option require 'vtt' format, but got '".concat(getExt(this.art.option.subtitle), "'."));
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
@@ -986,6 +991,7 @@
|
||||
}, {
|
||||
key: "change",
|
||||
value: function change(url) {
|
||||
errorHandle(getExt(url) === 'vtt', "'url' option require 'vtt' format, but got '".concat(getExt(url), "'."));
|
||||
this.art.refs.$track.src = url;
|
||||
}
|
||||
}]);
|
||||
|
||||
Reference in new issue
Block a user