2015-06-15 43 views
0

Here是如何將m3u8與流水遊戲一起嵌入的示例。使用JS嵌入m3u8與流水遊戲

<div data-live="true" data-ratio="0.5625" class="flowplayer play-button fixed-controls"> 
    <video> 
     <source type="application/x-mpegurl" src="http://wms.shared.streamshow.it/telesanremo/telesanremo/playlist.m3u8" data-title="Live stream"> 
    </video> 
</div> 

嵌入RTMP使用JS方法:

flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", { 
    clip: { 
     url: 'streamname', 
     live: 'true', 
     provider: 'rtmp' 
    }, 
    plugins: { 
     rtmp: { 
      url: 'flowplayer.rtmp-3.2.13.swf', 
      netConnectionUrl: 'rtmp://some_rtmp_link' 
     } 
    } 
}); 

我的問題:是否有一個JavaScript或jQuery的方法在例如RTMP嵌入M3U8,什麼樣的?

回答

0

感謝耶穌基督,找到了答案:

HTML:

<div id="player" class="fixed-controls" style="width:600px; height:338px;"></div> 

JS:

var api = flowplayer("#player", { 
    live: true, 
    splash: true, 
    clip: { 
     sources: [ 
      { 
       type: "application/x-mpegurl", 
       src: "http://srv6.zoeweb.tv:1935/z330-live/stream/playlist.m3u8" 
      } 
     ], 
     title: "LiveStream" 
    }, 
    embed: { 
     skin: "http://releases.flowplayer.org/6.0.1/skin/bauhaus.css" 
    } 
});