m3u8的浏览器播放器


  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>the5fire m3u8 test</title>
  5. <script src="http://the5fireblog.b0.upaiyun.com/staticfile/swfobject.js"></script>
  6. </head>
  7. <body>
  8. <div id="player">
  9. </div>
  10. <script>
  11. var flashvars = {
  12. // M3U8 url, or any other url which compatible with SMP player (flv, mp4, f4m)
  13. // escaped it for urls with ampersands
  14. src: escape("http://www.the5fire.com/static/demos/diaosi.m3u8"),
  15. // url to OSMF HLS Plugin
  16. plugin_m3u8: "http://www.the5fire.com/static/demos/swf/HLSProviderOSMF.swf",
  17. };
  18. var params = {
  19. // self-explained parameters
  20. allowFullScreen: true,
  21. allowScriptAccess: "always",
  22. bgcolor: "#000000"
  23. };
  24. var attrs = {
  25. name: "player"
  26. };
  27. swfobject.embedSWF(
  28. // url to SMP player
  29. "http://www.the5fire.com/static/demos/swf/StrobeMediaPlayback.swf",
  30. // div id where player will be place
  31. "player",
  32. // width, height
  33. "800", "485",
  34. // minimum flash player version required
  35. "10.2",
  36. // other parameters
  37. null, flashvars, params, attrs
  38. );
  39. </script>
  40. </body>
  41. </html>
本博客所有文章如无特别注明均为原创。作者:果果 ,复制或转载请以超链接形式注明转自 冰寒吧 。
原文地址《m3u8的浏览器播放器》

网友评论(0)