From 093e5b213f588f64a18425605d64caf3a8ab5c91 Mon Sep 17 00:00:00 2001 From: Harvey Zack Date: Sat, 13 Oct 2018 17:49:32 +0800 Subject: [PATCH] bugfix --- src/mse.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/mse.js b/src/mse.js index add7c0959..fd10c4347 100644 --- a/src/mse.js +++ b/src/mse.js @@ -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; }