mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-12 23:36:15 -08:00
bugfix
This commit is contained in:
1 parent
a395bc4550
commit
093e5b213f
1 file changed
+2
-6
+2
-6
@@ -18,14 +18,10 @@ export default class Mse {
|
||||
setMimeCodec() {
|
||||
const { option } = this.art;
|
||||
if (!option.type) {
|
||||
const urlArr = option.url
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.split('.');
|
||||
const type = urlArr[urlArr.length - 1];
|
||||
const type = option.url.trim().toLowerCase().split('.').pop();
|
||||
errorHandle(
|
||||
Object.keys(mimeCodeces).includes(type),
|
||||
`Can't find video's type from ${option.url}`
|
||||
`Can't find video's type '${type}' from '${option.url}'`
|
||||
);
|
||||
option.type = type;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user