标签:
M3U8 TEST
<!DOCTYPE html> <html> <head> <title>M3U8 TEST</title> </head> <body> <div id="player"> </div> </body> </html>
<script src="lib/swfobject.js"></script> <script> var flashvars = { // M3U8 url, or any other url which compatible with SMP player (flv, mp4, f4m) // escaped it for urls with ampersands src: escape("JETER.mp4"), // url to OSMF HLS Plugin // plugin_m3u8: "HLSProviderOSMF.swf", CSS1 plugin_m3u8: "HLSDynamicPlugin.swf" }; var params = { // self-explained parameters allowFullScreen: true, allowScriptAccess: "always", bgcolor: "#000000" }; var attrs = { name: "player" }; swfobject.embedSWF( // url to SMP player "StrobeMediaPlayback.swf", // div id where player will be place "player", // width, height "800", "485", // minimum flash player version required "10.2", // other parameters null, flashvars, params, attrs ); </script>
播放器必要文件(如.swf文件等)下载地址:http://blog.denivip.ru/index.php/2013/05/osmf-hls-plugin/?lang=en
注意:如果你的播放器不能播放M3U8链接的视频,那么请试一下这个播放器可否播放本地的MP4视频。如果MP4可以播放,那么就说明播放器是工作的。这个不能播放的问题就在M3U8视频所在的服务器上了,Flash跨域的问题,crossdomain.xml就是这个文件,改成"*"就可以了。
闪人了,我赶紧想想Flash播放器样式的问题去吧还是,对于AS屁嘛不懂。
标签:
原文地址:http://www.cnblogs.com/Darkdreams/p/4484405.html