mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-11-27 23:01:34 +08:00
v0.8.18 优化代码
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user