• html 视频播放器


    html  视频播放器

    <html>
    <script>
    /**  
    *视频播放  
    *参数说明  
    u - 媒体URL  
    w - 媒体宽度width  
    h - 媒体高度height  
    */  
    //播放Mediaplayer格式的视频,包括.avi .mpg .mpeg .wmv .wma .asf .mid .mp3等  
    function pv_m(u, w, h){  
    var pv='';  
    pv += '<object width="'+w+'" height="'+h+'" id="iask_v" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">';  
    pv += '<param name="FileName" value="'+u+'">';  
    pv += '<param name="AutoStart" value="1">';  
    pv += '<param name="AutoSize" value="1">';  
    pv += '<param name="ShowControls" value="1">';  
    pv += '<param name="ShowPositionControls" value="0">';  
    pv += '<param name="ShowAudioControls" value="1">';  
    pv += '<param name="ShowTracker" value="1">';  
    pv += '<param name="ShowDisplay" value="0">';  
    pv += '<param name="ShowStatusBar" value="1">';  
    pv += '<param name="ShowGotoBar" value="0">';  
    pv += '<param name="ShowCaptioning" value="0">';  
    pv += '<param name="PlayCount" value="1">';  
    pv += '<param name="AnimationAtStart" value="0">';  
    pv += '<param name="TransparentAtStart" value="0">';  
    pv += '<param name="AllowScan" value="0">';  
    pv += '<param name="EnableContextMenu" value="0">';  
    pv += '<param name="ClickToPlay" value="0">';  
    pv += '<param name="InvokeURLs" value="1">';  
    pv += '<param name="DefaultFrame" value="">';  
    pv += '<embed src="'+u+'" width="'+w+'" height="'+h+'" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&;sbp=mediaplayer&ar=media&sba=plugin&" name="MediaPlayer" showcontrols="1" showpositioncontrols="0" showaudiocontrols="1" showtracker="1" showdisplay="0" showstatusbar="1" autosize="0" showgotobar="0" showcaptioning="0" autostart="1" autorewind="0" animationatstart="0" transparentatstart="0" allowscan="1" enablecontextmenu="1" clicktoplay="0" invokeurls="1" defaultframe=""></embed>';  
    pv += '</object>';  
    document.write(pv);  
    }  
    
    //播放Realplay格式的视频,包括.rm .ram .rmvb等  
    function pv_r(u, w, h){  
    var pv='';  
    pv += '<object width="'+w+'" height="'+h+'" id="iask_v" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">';  
    pv += '<param name="SRC" value="'+u+'">';  
    pv += '<param name="AUTOSTART" value="1">';  
    pv += '<param name="CONTROLS" value="Imagewindow,StatusBar,ControlPanel">';  
    pv += '<param name="_ExtentX" value="18415">';  
    pv += '<param name="_ExtentY" value="9102">';  
    pv += '<param name="SHUFFLE" value="0">';  
    pv += '<param name="PREFETCH" value="0">';  
    pv += '<param name="NOLABELS" value="0">';  
    pv += '<param name="CONSOLE" value="Clip1">';  
    pv += '<param name="LOOP" value="0">';  
    pv += '<param name="NUMLOOP" value="0">';  
    pv += '<param name="CENTER" value="0">';  
    pv += '<param name="MAINTAINASPECT" value="0">';  
    pv += '<param name="BACKGROUNDCOLOR" value="#000000">';  
    pv += '<embed src="'+u+'" width="'+w+'" height="'+h+'" type="audio/x-pn-realaudio-plugin" console="Clip1" controls="Imagewindow,StatusBar,ControlPanel" autostart="true">';  
    pv += '</object>';  
    document.write(pv);  
    }  
    
    //播放Quicktime格式的视频,包括.mov .amr .3gp等  
    function pv_q(u, w, h){  
    var pv='';  
    pv += '<object width="'+w+'" height="'+h+'" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">';  
    pv += '<param name="src" value="'+u+'">';  
    pv += '<param name="controller" value="true">';  
    pv += '<param name="type" value="video/quicktime">';  
    pv += '<param name="autoplay" value="true">';  
    pv += '<param name="target" value="myself">';  
    pv += '<param name="bgcolor" value="black">';  
    pv += '<param name="pluginspage" value="http://www.apple.com/quicktime/download/index.html">';  
    pv += '<embed src="'+u+'" width="'+w+'" height="'+h+'" controller="true" align="middle" bgcolor="black" target="myself" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/index.html"></embed>';  
    pv += '</object>';  
    document.write(pv);  
    } 
    
    </script>
    <body>
    
    
    <div  style='background-color:blue;300px;height:200px' onclick="pv_r('./111.rmvb',300,200)"></div>
    
    
    
    </body>    
    </html>
  • 相关阅读:
    去除空格
    常见的Js
    无法访问 ASP 兼容性模式
    asp.net mvc 笔记一
    PowerDesigner如何将设计的表更新到数据库中
    微信小程序基于第三方websocket的服务器端部署
    C# Linq GroupBy 分组过滤求和
    一步一步教你用c# entity framework6 连接 sqlite 实现增删改查
    执行指定iframe页面的脚本
    vs2017 x64 ibatis.net 平台调用 Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342 x64
  • 原文地址:https://www.cnblogs.com/jxkshu/p/4508133.html
Copyright © 2020-2023  润新知