2
我使用wowza流引擎和jw播放器來顯示流並正常工作。但是我想控制一個視頻的比特率,這樣用戶就可以在沒有太多緩衝的情況下看到視頻。 所以我在stackoverflow中搜索並找到以下鏈接。 why smil file is not working with rtmp both in wowza and jwplayerJWPlayer只顯示蘋果HLS和我的smil文件在wowza
我使用JWplayer親6.0.2813和wowza 4.3
這裏是我的test.smil文件
<smil>
<head>
</head>
<body>
<switch>
<video src='mp4:test_49152.mp4' system-bitrate='49152' title='192x108'/>
<video src='mp4:test_114688.mp4' system-bitrate='114688' title='256x144'/>
<video src='mp4:test_184320.mp4' system-bitrate='184320' title='320x180'/>
<video src='mp4:test_339968.mp4' system-bitrate='339968' title='480x270'/>
<video src='mp4:test_544768.mp4' system-bitrate='544768' title='640x360'/>
<video src='mp4:test_987136.mp4' system-bitrate='987136' title='854x480'/>
</switch>
</body>
</smil>
和我的js代碼:
var playerInstance = jwplayer("myElement");
playerInstance.setup({
type: 'smil',
playlist: [{
image: "/images/myPoster.jpg",
sources: [{
file: "http://173.244.173.196:1935/vod/smil:test.smil/manifest.mpd"
},{
file: "rtmp://173.244.173.196:1935/vod/smil:test.smil" //Adobe RTMP . not work
},{
file: "http://173.244.173.196:1935/vod/smil:test.smil/jwplayer.smil" //Adobe RTMP . not work
},{
file: "http://173.244.173.196:1935/vod/smil:test.smil/manifest.f4m"
},{
file: "rtsp://173.244.173.196:1935/vod/smil:test.smil"
},{
file: "http://173.244.173.196:1935/vod/smil:test.smil/playlist.m3u8" //this work fine!
}]
}],
width: '100%',
aspectratio: "16:9",
primary: "flash",
stretching: "uniform"
});
這是完全在蘋果設備上工作正常但顯示黑屏在android和桌面瀏覽器。
幹得好....;) –