-
Notifications
You must be signed in to change notification settings - Fork 0
/
play.js
52 lines (48 loc) · 1.22 KB
/
play.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
var playerw='100%';//电脑端播放器宽度
var playerh='100%';//电脑端播放器高度
var mplayerw='100%';//手机端播放器宽度
var mplayerh='80%';//手机端播放器高度
var adsPage="";//视频播放前广告页路径
var adsTime=0;//视频播放前广告时间,单位秒
var jxAname="";
var jxBname="";
var jxCname="";
var jxDname="";
var jxEname="";
var jxAapi="";
var jxBapi="";
var jxCapi="";
var jxDapi="";
var jxEapi="";
var forcejx="no";
var unforcejx="";
var unforcejxARR = unforcejx.split('#');
function contains(arr, obj) {
var i = arr.length;
while (i--) {
if (arr[i] === obj) {
return true;
}
}
return false;
}
function IsPC() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone",
"SymbianOS", "Windows Phone",
"iPad", "iPod"];
var flag = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
var flag = IsPC(); //true为PC端,false为手机端
if(flag==false)
{
playerw=mplayerw;
playerh=mplayerh;
}