This commit is contained in:
Harvey Zack committed 2018-10-13 17:49:32 +08:00
1 parent a395bc4550
commit 093e5b213f
1 file changed
+2 -6
+2 -6
View File
@@ -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;
}