1.找到视频,,开发者工具,CTRL+F.
2.中间条框输入M3U8,,点CONSOLE,
3.例如得到
var templete_url='/static/js/';
var signal;
function setSignal(bqState) {
checkckplay(bqState);
}
function checkckplay(bqState) {
signal = '�������$rtmp://hljwc.chinashadt.com:1988/live/video5.stream$flv';
var data = signal.split('$'),
url = data[1],
domResult = null,
bqState = bqState;
if (bqState == 'no') {
//data[3]��ȫ��
if(data[3]=='fullScreen'){
var domResult = setWinInfo(url, data[2],'fullScreen');
}else{
var domResult = setWinInfo(url, data[2]);
}
} else if (data[2] == "64ma") {
domResult = view64ma(url, player.width, player.height);
}else if (data[2] == "iframe") {
domResult = viewplayin(url, player.width, player.height);
}else if (data[2] == "m3u8") {
viewm3u8(url, player.width, player.height);
} else if (data[2] == "flv") {
viewflv(url, player.width, player.height);
//flv������
//ck������
//domResult
} else if (data[2] == "cntv") {
var cntvurl='/static/js/play/cntv.html?id='+url;
domResult = viewplayin(cntvurl, player.width, player.height);
} else if (data[2] == "tvkoo") {
domResult = viewtvkoo(url, player.width, player.height);
} else if (data[2] == "jw") {
var resule = viewjw(url, player.width, player.height);
resule.write('hqzhibo-player');
}
domResult && $('#hqzhibo-player').empty().prepend(domResult);
domResult = null;
}
//����FLV
function view64ma(url, w, h) {
var dom = '<iframe allowTransparency="true" border="0" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="http://live.64ma.com/tv/tv.asp?pid=' + url + '&user=simon" width="' + w + '" height="' + h + '"></iframe>';
return dom;
}
//FLV //�ٷ�FLV
function viewplayin(url, w, h) {
var dom = '<iframe allowTransparency="true" border="0" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="' + url + '" width="' + w + '" height="' + h + '"></iframe>';
return dom;
}
//m3u8
function viewm3u8(url, w, h) {
var flashvars = {
f: '/static/js/ckplayer/m3u8.swf', //ʹ��swf�򲥷���������Ƶ��ַ���в���
a: url, //m3u8�ļ�
c: 0, //���� ckplayer.js ������
p: 1, //�Զ�������Ƶ
s: 4, //flash�����ʽ������Ƶ����ַ�����������в���
lv: 1, //ע�⣬�����ֱ����������lv:1
loaded: 'loadedHandler'
}
var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'};
CKobject.embedSWF('/static/js/ckplayer/ckplayer.swf','hqzhibo-player','ckplayer_a1','100%','480',flashvars,params);
function closelights(){//�ص�
alert(' ����ʾ��֧�ֿ��ص�');
}
function openlights(){//����
alert(' ����ʾ��֧�ֿ��ص�');
}
}
//tvkoo������
function viewtvkoo(url, w, h) {
var dom = '<iframe allowTransparency="true" border="0" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="'+templete_url+'player/cntv/cntv.html?channel=' + url + '&w=' + w + '&h=' + h + '" width="' + w + '" height="' + h + '"></iframe>';
return dom;
}
//����ck.js
function viewflv(url, w, h) {
$('#hqzhibo-player').empty();
var flashvars = {
f: url,
s: '0',
e: '2',
p: '1',
h: '4',
ct: '2'
};
var params={wmode:'transparent',bgcolor:'#000',allowFullScreen:true,allowScriptAccess:'always'}
CKobject.embedSWF(templete_url + 'ckplayer/ckplayer.swf', 'hqzhibo-player', 'ck-player', w, h, flashvars,params);
}
//����swfobject.js
function viewjw(url, w, h) {
//document.write('<div id="mediaspace">This text will be replaced</div>');
var so = new SWFObject(templete_url+'player/jwplayer/player2.swf', "mediaspace", "" + w + "", "" + h + "", "9", templete_url +'jwp layer/adaptiveProvider.swf', "#000000");
so.addVariable("autostart", "true");
//so.addVariable("skin", "/js/jwplayer/rambla.zip");
so.addVariable("controlbar","over");
so.addVariable("stretching", "exactfit");
so.addVariable("logo.file", templete_url+'img/player_logo.png');
so.addVariable("logo.hide", "false");
so.addVariable("logo.position", "top-left");
so.addVariable("logo.link", domain);
so.addVariable("abouttext", domain);
so.addVariable("aboutlink", domain);
so.addVariable("provider", templete_url +'player/jwplayer/adaptiveProvider.swf');
so.addVariable("file", "" + url + "");
so.addVariable("streamer", "");
//so.addVariable("streamer", ""+unescape(PlayerFile)+"");
so.addParam("allowFullScreen", "true");
so.addParam("wmode", "transparent");
so.addParam("bgcolor", "#000000");
return so;
}
function setWinInfo(url, source, size) {
var fullScreen = '',
fullUrl;
if(arguments.length == 3){
fullScreen = '#' + size;
}
switch (source) {
case '64ma':
fullUrl = url;
break;
case 'playin':
fullUrl = url;
break;
case 'fyzb':
fullUrl = 'http://resource.ws.kukuplay.com/players/2014/01/25/50493/fengyun.swf?cid='+url;
break;
}
var u = '<a data-type="win" data-url="' + fullUrl + fullScreen +'" href="javascript:void(0)" style="font-size:50px;color:#FFF;font-family:\5FAE\8F6F\96C5\9ED1;line-height:2em;display:block;width:100%;height:480px;line-height:480px">����ۿ��ٷ�ֱ��</a>';
return u;
}
4.得到rtmp://hljwc.chinashadt.com:1988/live/video5.stream,即为直播源,湖南卫视 |