设为首页 | 收藏本页
登陆您的帐号 | 免费注册帐号
全部栏目 > 计算机 > 互联网络 > 在线视频
下一篇上一篇 首页图文展示(无图)

MMS FLV地址嵌入网页代码

发布人:hy58
发布日期:2015-06-08 12:27:56
刷新日期:2015-06-08 12:29:03
回复或评论:0
阅览:877
1、MMS地址嵌入网页方法  (适用于mms、rtsp地址) 
(1)编写嵌入网页代码,并保存为mms.html文件;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<script> 
try { 
 var LocString=new String(window.document.location.href);
 function GetQueryString(str) {
  var rs=new RegExp("(^|)"+str+"=([^&]*)(&|$)","gi").exec(LocString),tmp;
  if(tmp=rs)return tmp[2];
  return null;
}
 var cid=GetQueryString("url");
 var name=GetQueryString("name");
}
catch(e){}
</script>
</head>
<body topmargin="0" leftmargin="0" bgcolor="#000000" scroll=no>
<script> 
str=location.search.substring(1,location.search.length);
document.writeln("<object id="MediaPlayer1" style="left: 0px; top: 0px" type="application/x-oleobject" height="100%" standby="Loading Media Player components..." width="100%" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6">");
document.writeln("<param name="Url" value='"+cid+"'>");
document.writeln("<param name="rate" value="1">");
document.writeln("<param name="balance" value="0">");
document.writeln("<param name="currentPosition" value="0">");
document.writeln("<param name="playCount" value="1">");
document.writeln("<param name="autoStart" value="-1">");
document.writeln("<param name="currentMarker" value="0">");
document.writeln("<param name="invokeURLs" value="-1">");
document.writeln("<param name="volume" value="100">");
document.writeln("<param name="mute" value="0">");
document.writeln("<param name="uiMode" value="full">");
document.writeln("<param name="stretchToFit" value="-1">");
document.writeln("<param name="windowlessVideo" value="0">");
document.writeln("<param name="enabled" value="0">");
document.writeln("<param name="enableContextMenu" value="-1">");
document.writeln("<param name="fullScreen" value="0">");
document.writeln("<param name="enableErrorDialogs" value="0">");
document.writeln("  </object>")
</script>
</body>
 </html>

(2)将代码文件上传,获取代码文件网址。
        例如,
http://xuhui8491.svfree.net/html/mms.html        打开后查看源文件,可获取代码!       
(3)编写频道连接地址,完成频道列表编辑;
        连接地址格式: <a href="代码文件网址?url=mms或rtsp地址">频道名称</a>
        例如,<a href="
http://xuhui8491.svfree.net/html/mms.html?url=mms://60.173.29.193/tv1">铜陵新闻</a>
        <a href="http://xuhui8491.svfree.net/html/mms.html?url=rtsp://76.73.60.108/hlw.irftwsdfvzpoik?sessionId=634781520219025454">好莱坞电影
</a>  
(4)html列表可打开测试,最后上传列表文件。

2、FLV址地嵌入网页方法   (适用于flv、rtmp地址,方法同上)
(1)编写嵌入网页代码,并保存为flv.html文件; 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>FVL</title>
<script> 
function J_get(name){
 var js_get =self.window.document.location.href;
 var start =js_get.split('.html?' + name + '=');
 if (start.length==1) return '';
   return unescape(start[1]);
}
var id = J_get('url');
var file = J_get('file');
</script> 
</head>

<body topmargin="0" leftmargin="0">
<script> 
if(file > -1){
document.write('<object id="null" width="100%" height="100%" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param value="#000000" name="bgcolor"><param name="quality" value="high"><param name="cachebusting" value="true"><param name="src" value="play.swf"><param name="wmode" value="opaque"><param name="flashvars" value="file=livestream&type=video&streamer='+id+'&autostart=true&controlbar=over"><embed id="null" width="100%" height="100&" type="application/x-shockwave-flash" src="play.swf" allowfullscreen="true" allowscriptaccess="always" quality="high" cachebusting="true" wmode="opaque" bgcolor="#000000" flashvars="file=livestream&type=video&streamer='+id+'&autostart=true&controlbar=over"></object>');
} else {
document.write('<object id="null" width="100%" height="100%" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param value="#000000" name="bgcolor"><param name="quality" value="high"><param name="cachebusting" value="true"><param name="src" value="play.swf"><param name="wmode" value="opaque"><param name="flashvars" value="file='+file+'&type=video&streamer='+id+'&autostart=true&controlbar=over"><embed id="null" width="100%" height="100&" type="application/x-shockwave-flash" src="play.swf" allowfullscreen="true" allowscriptaccess="always" quality="high" cachebusting="true" wmode="opaque" bgcolor="#000000" flashvars="file='+file+'&type=video&streamer='+id+'&autostart=true&controlbar=over"></object>');
}
//请注意,不换行!
</script> 


</body>
</html>

(2)将代码文件上传,获取代码文件网址。
        例如,http://xuhui8491.svfree.net/html/flv.html       打开后查看源文件,可获取代码!    
(3)编写频道连接地址,完成频道列表编辑;
        连接地址格式: <a href="代码文件网址?url=flv或rtmp地址">频道名称</a>
        例如,<a href="
http://xuhui8491.svfree.net/html/flv.html?url=http://61.191.214.229/channels/1531/500.flv/live"> 芜湖新闻</a>
                  <a href="
http://xuhui8491.svfree.net/html/flv.html?url=rtmp://vod.ahbbtv.com:1935/live/&file=xwpd1"> 蚌埠新闻</a> 
(4)html列表可打开测试,最后上传列表文件。
评论(0) 暂无回帖


打印 收藏 关闭窗口 下一篇上一篇