v0.8.18 优化代码

This commit is contained in:
Hunlongyu
2020-02-22 12:21:06 +08:00
parent 9ce1a8ddf6
commit 4505186307
12 changed files with 56 additions and 12 deletions

View File

@@ -29,12 +29,17 @@
function get (name) {
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);//search,查询?后面的参数,并匹配正则
if(r!=null)return unescape(r[2]); return null;
if (r!=null)return unescape(r[2]); return null;
}
let link = window.location.href
let info = get('info')
let time = get('time')
let url = info.split('$')[1]
let flag = info.indexOf('$')
if (flag > 0) {
let url = info.split('$')[1]
} else {
let url = info
}
let player = new window.HlsJsPlayer({
id: 'mse',
url: url,