//父窗口地址
function ParentUrl(){
var url='';
try {
url = window.top.document.referrer ;
catch(M) {
if (window.parent) {
try {
url = window.parent.document.referrer;
catch(L) {
url = "";
if (url === "") {
url = document.referrer;
return url;
function IsPC() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone","SymbianOS", "Windows Phone","iPad", "iPod"];
var flagPc = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flagPc = false;
break;
return flagPc;
function test()
{
alert('test');
function SetPlayer()
{
// alert(parent._player);
if(parent._player==false)
{
startCount();
player.play();
parent._player=true;
function SetPause()
{
//alert(parent._player);
if(parent._player==true)
{
stopCount();
player.pause();
parent._player=false;
else
{
t = setTimeout(function(){ timedCount()
, 1000);
c = c + 1;
function startCount() {
if (!timer_is_on) {
timer_is_on = 1;
timedCount();
function stopCount() {
clearTimeout(t);
timer_is_on = 0;
九五至尊网站
//获取窗口高度
function getWindowHeight() {
var windowHeight = 0;
if (typeof (window.innerHeight) == 'number') {
windowHeight = window.innerHeight;
else {
if (document.documentElement && document.documentElement.clientHeight) {
windowHeight = document.documentElement.clientHeight;
else {
if (document.body && document.body.clientHeight) {
windowHeight = document.body.clientHeight;
return windowHeight;
//获取窗口宽度
function getWindowWidth() {
var windowWidth = 0;
if (typeof (window.innerWidth) == 'number') {
windowWidth = window.innerWidth;
else {
if (document.documentElement && document.documentElement.clientWidth) {
windowWidth = document.documentElement.clientWidth;
else {
if (document.body && document.body.clientWidth) {
windowWidth = document.body.clientWidth;
return windowWidth;
function isTrident() {
//是否内核,判断ie内核
var ua = navigator.userAgent;
var tridentPattern = /Trident\/(\d+)/;
return tridentPattern.test(ua);
// 判断是否在360兼容模式,进行滚动条样式适配
function is360CompatibilityMode() {
const userAgent = navigator.userAgent;
// 打印用户代理字符串以便调试
//console.log("User Agent: ", userAgent);
// 检查用户代理字符串中是否包含 '360' 和 'Trident'
const is360 = userAgent.indexOf('360') !== -1;
const isIE = userAgent.indexOf('MSIE') !== -1 || userAgent.indexOf('Trident') !== -1;
// 如果没有 '360' 但有 'Trident',也可以认为是在兼容模式下
return is360 || isIE; // 如果满足任一条件则返回 true
// 判断是否火狐
function isFirefox() {
const userAgent = navigator.userAgent;
// 打印用户代理字符串以便调试
//console.log("User Agent: ", userAgent);
// 检查用户代理字符串中是否包含 '360' 和 'Trident'
const is360 = userAgent.indexOf('Firefox') !== -1;
const isIE = userAgent.indexOf('MSIE') !== -1 || userAgent.indexOf('Trident') !== -1;
// 如果没有 '360' 但有 'Trident',也可以认为是在兼容模式下
return is360 || isIE; // 如果满足任一条件则返回 true
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i");
var r = window.location.search.substr(1).match(reg);
if (r!=null) return (r[2]); return null;
var _website =window.location.host;
var _protocol= window.location.protocol;
var loc =GetQueryString("url");
var isview =GetQueryString("view");
var _site =GetQueryString("site");
var _warning =GetQueryString("warning");
var _width=GetQueryString("width");
var _height= GetQueryString("height");
var pic = GetQueryString("pic");
var _VideoTypeID=GetQueryString("VideoTypeID");//视频类型
var _volume=GetQueryString("volume"); //声音自定义
var _partloc=loc;
if(_volume==null ||_volume=="")
{
_volume=100;
if(_width==null ||_height==null)
{
// _width=606;
// _height= 400;
_width=getWindowWidth();
_height=getWindowHeight();
if(_width==0||_height==0){
_width=parent._showframewidth;
_height=parent._showframeheight;
if(IsPC()==true)
{
var _ParentUrl=ParentUrl();
if(_ParentUrl!="")
{
if(_ParentUrl.toLowerCase().indexOf("/news/detail/")>-1 && _width==375)//375的时候,放大
{
_width=parseInt(_width)*1.5;
var swf="";
var url = window.location.search;
//var loc = url.substring(url.lastIndexOf('=')+1, url.length);
if(loc==null || loc==''){
alert('找不到视频资源');
//return false;
else
{
swf='//xmvideo.mtnets.com/'+loc+'/'+loc+'.mp4';
//直接输入新版vod地址
if( swf.indexOf("mtnetsvideo")>-1 ||swf.indexOf("videoworks")>-1 )
{
swf=loc;
if(swf!="")
{
try{
_partloc=swf.split("videoworks/")[1].split("/industry")[0];
catch(e)
{
if(isview=='show')//view
{
_width=780;
_height= 480;
else if(isview=='in_pro') //行业站产品
{
_width="423";
_height= "365";
else if(isview=='standshowvideo1') //视频栏目
{
_width="606";
_height= "347";
else if(isview=='stand_pro') //102
{
_width="660";
_height= "347";
else if(isview=='stand_pro101')
{
_width="337";
_height= "289";
else if(isview=='chem17_pro')
{
_width="448";
_height= "303";
//vod新版地址
if(_VideoTypeID==7){
var _workkeyid=GetQueryString("WorksKeyID");
swf='https://video.mtnets.com/'+_workkeyid+'';
if(pic==null){
pic="https://video.mtnets.com/"+_workkeyid.replace("z/bos-","p/bos-").replace(".mp4",".jpg").replace(".MP4",".jpg");
if(pic==null)
{
pic='//xmvideo.mtnets.com/'+loc+'/'+loc+'.jpg';
var _link=_protocol+"//"+_website;
if(isTrident()==true || is360CompatibilityMode()==true || isFirefox()==true){
//ie内核
var _workkeyid=GetQueryString("WorksKeyID");
_workkeyid=_workkeyid.replace('http://mtnets-video.oss-cn-shanghai.aliyuncs.com/','https://shortvideo.mtnets.com/');
if(_VideoTypeID==8)
{
swf=_workkeyid;
if(_VideoTypeID==7)
{
swf='https://video.mtnets.com/'+_workkeyid+'';
var player = cyberplayer("playercontainer").setup({
width: _width,
height: _height,
file:swf,
image: pic,
autostart: false,
stretching: "uniform",
repeat: false,
volume: 100,
controls: true,
controlbar: {
barLogo: false
,
ak: 'c71e5c9720054062901bac7fe80bf8c3'
);
else if(_VideoTypeID==8){
var _workkeyid=GetQueryString("WorksKeyID");
var _licensedomain= window.location.host.replace("www.","").replace("webinar.","").replace("toutiao.","").replace("xwh.","")
if(_licensedomain.indexOf("a-bm")==-1)
{
_licensedomain=_licensedomain.replace("m.","")
_workkeyid=_workkeyid.replace('http://mtnets-video.oss-cn-shanghai.aliyuncs.com/','https://shortvideo.mtnets.com/');
var player = new Aliplayer({
"id": "player-con",
"source": _workkeyid,
"width":_width+"px",
"height": _height+"px",
"autoplay": false,
"isLive": false,
"rePlay": false,
"playsinline": true,
"preload": true,
"controlBarVisibility": "hover",
"useH5Prism": true,
skinLayoutIgnore: [
//'bigPlayButton', // 隐藏大播放按钮
'controlBar.subtitle', // 隐藏控制条上的全屏按钮(通过点运算符进行子组件选择)
'controlBar.setting' // 隐藏控制条上的全屏按钮(通过点运算符进行子组件选择)
],
license: {
domain:_licensedomain , // 申请 License 时填写的域名
key: "YPlNtoI5rmwyXgZDf7bf3242cb7c94ef9a5b700565665f78a" // 申请成功后,在控制台可以看到 License Key
, function (player) {
player.mute();
console.log("The player is created");
);
// 有些事件会频繁触发,可以通过 player.one 只监听一次
player.one('canplay', function (e) {
if(_warning=="0")
{
setTimeout(function() {
player.dispose();
window.parent.document.getElementsByClassName("Warning")[0].style.display='block';
, 5000);
);
else{
var player = cyberplayer("playercontainer").setup({
width: _width,
height: _height,
file:swf,
image: pic,
autostart: false,
stretching: "uniform",
repeat: false,
playRate: false,
volume: _volume,
controls: true,
starttime: 0,
controlbar: {
barLogo: false
,
rightclick: [ // 右键配置
{
title: "网站首页", // 标题1
link: _link// 跳转链接
],
ak: 'c71e5c9720054062901bac7fe80bf8c3',
primary: "videojs" // 要使移动端有效,此参数必设!!
);
player.on('beforePlay', function (e) {
if(_warning=="0")
{
setTimeout(function() {
player.remove();
window.parent.document.getElementsByClassName("Warning")[0].style.display='block';
, 5000);
else
{
//10秒后扣流量
);
player.on('play', function (e) {
//alert('play');
parent._player=true;
startCount() ;
);
player.on('pause', function (e) {
//alert('pause');
parent._player=false;
stopCount() ;
);
player.on('complete', function (e) {
c=0;
stopCount() ;
);
function clock()
{
alert('a');
///setTimeout(function() {
//类名中存在成立-缩放视频封面图片
//Array.prototype.forEach.call(playercontainer.getElementsByClassName('jw-preview'),function(item,index,arr){
// item.style.backgroundSize = 'contain';
//
);
//
, 100);
)();
document.write("")