zoukankan      html  css  js  c++  java
  • 前端播放flv

     1         <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600" id="myFlashContent">
     2             <param name="movie" value="/Content/swfobject/swf/player_flv_multi.swf" />
     3             <param name="play" value="true" />
     4             <param name="menu" value="true" />
     5             <param name="allowfullscreen" value="true" />
     6             <param name="flashvars" value="configxml=/Content/swfobject/config/flv_config_multi.xml&amp;@(ViewBag.videos)" />
     7             <!--[if !IE]>-->
     8             <object type="application/x-shockwave-flash" data="/Content/swfobject/swf/player_flv_multi.swf" width="800" height="600">
     9                 <param name="play" value="true" />
    10                 <param name="menu" value="true" />
    11                 <param name="allowfullscreen" value="true" />
    12                 <param name="flashvars" value="configxml=/Content/swfobject/config/flv_config_multi.xml&amp;@(ViewBag.videos)" />
    13                 <!--<![endif]-->
    14                 <a href="http://www.adobe.com/go/getflashplayer">
    15                     <H1>点击我运行运行Aodbe Flash Player</H1>
    16                     <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
    17                 </a>
    18                 <!--[if !IE]>-->
    19             </object>
    20             <!--<![endif]-->
    21         </object>
    22 
    23     <!-- Jquery Core Js -->
    24     <script src="~/Content/bootstrap_3.3.6/plugins/jquery/jquery.min.js"></script>
    26     <script src="~/Content/swfobject/js/swfobject.js"></script>
    
    34         <script type="text/javascript">
    35         swfobject.registerObject("myFlashContent", "9.0.0", "/Content/swfobject/swf/expressInstall.swf");
    36     </script>

     后台代码:

    1         public ActionResult Index(int VideoId)
    2         {
    3             var vd = VideosService.LoadEntities(s => s.VideoId == VideoId).FirstOrDefault();
    4             ViewBag.videos = "&flv=" + vd.VideoUrl + "&title=" + vd.VideoName + "&startimage=" + vd.TopImgUrl;
    5             return View();
    6         }

    SWFObject:

        是一个用于在HTML中方便插入Adobe Flash媒体资源(*.swf文件)的独立、敏捷的JavaScript模块。该模块中的JavaScript脚本能够自动检测PC、Mac机器上各种主流浏览器对Flash插件的支持情况。它使得插入Flash媒体资源尽量简捷、安全。而且它是非常符合搜索引擎优化的原则的。此外,它能够避免您的 HTML、XHTML中出现object、embed等非标准标签,从而符合更加标准。

        提供两种优化的嵌入Flash Player的方法:一种基于标签的方法和一种依赖于JavaScript的方法。

    播放插件下载:http://flv-player.net/players/multi/generator/

    其它推荐播放插件:jPlayer、flv.js(将flv格式实时转换为mp4播放,实验结果:拖动进度条方式快进报错)

  • 相关阅读:
    yii 引入文件
    CodeForces 621C Wet Shark and Flowers
    面试题题解
    POJ 2251 Dungeon Master
    HDU 5935 Car(模拟)
    HDU 5938 Four Operations(暴力枚举)
    CodeForces 722C Destroying Array(并查集)
    HDU 5547 Sudoku(dfs)
    HDU 5583 Kingdom of Black and White(模拟)
    HDU 5512 Pagodas(等差数列)
  • 原文地址:https://www.cnblogs.com/viruscih/p/10250882.html
Copyright © 2011-2022 走看看