1. 程式人生 > >基於RTMP協議的Flash流媒體網頁直播播放器

基於RTMP協議的Flash流媒體網頁直播播放器

    本文記錄一些基於Flash技術的網頁播放器。基於Flash的網頁播放器相比於其他網頁播放器來說最大的優勢就是“免外掛安裝”了,這一點可以很大的提高使用者的體驗質量。


主要是幾種常用的網頁播放器:
rtmp_player_adobe:       從Adobe Flash Media Sever提取出來的測試播放器
rtmp_player_wowza:      從Wowza伺服器中提取出來的測試播放器

rtmp_player_flowplayer: 基於FlowPlayer的RTMP/HTTP播放器(新增RTMP plugin)

【rtmp_player_adobe】


【rtmp_player_flowplayer】

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="flowplayer-3.2.8.min.js"></script>
<title>HacFin FlowPlayer</title>
</head>

<body>	
	<h1>HacFin FlowPlayer</h1>
	
	<!-- this A tag is where your Flowplayer will be placed. it can be anywhere -->
	<a  
		 href="#"
		 style="display:block;width:720px;height:576px"  
		 id="player"> 
	</a> 
	<!-- this will install flowplayer inside previous A- tag. -->
	<script>
	flowplayer("player", "flowplayer-3.2.8.swf",{ 
		clip: { 
		  url: 'hkfystream', //流的名稱
		  provider: 'rtmp',
		  live: true, 
		},  
		plugins: {  
		   rtmp: {  
			 url: 'flowplayer.rtmp-3.2.8.swf',  
			 netConnectionUrl: 'rtmp://192.168.3.189/oflaDemo' //流的伺服器地址
		   } 
	   } 
	});
	</script>

	<p>		
		Sample RTMP URL (Live) is "rtmp://192.168.3.189/oflaDemo/hkfystream"
	</p>
	
</body>
</html>


【rtmp_player_wowza】


【下載地址】

參考:http://blog.csdn.net/wishfly/article/details/44534139