网页播放器实现全屏的方法总结

网页

   网页播放器全屏的方法(有点气,少写了)这是自己总结的,刚刚要完的时候点错了,重新发送一次,老子好气,该打游戏的时间,浪费了,这里就偷工减料了!
    1、media player全屏方法

   <script language="JavaScript">
    <!--

    var Real;
    Real='MediaPlayer1.';
    var Mute=false;
    var CanSetPos=true;
    var SetPosStart=false;
    var SetVolStart=false;
    var loop, timer, initialised;
    var speed=50;
    var oldwidth=566,oldheight=502;

    function DoFull()
    {
        eval(Real+'DisplaySize=3');
    }

NetShowServer = "" ;

var mPath = NetShowServer + "";

function LoadVideo(c1,c2) {
 if (c1=="") return;
 video_filename = c1;

 MusicPlayer.Cancel()
 timer=window.setTimeout("video_play()",2000)
}
function video_play(fn) {
 var mName = mPath + video_filename;
 MusicPlayer.Open(mName)
}
    //-->
          </script>
          <td width="39%" height="1" bgcolor="#E0E0E0">
          <input type="button" value="全屏显示" style="border-style: ridge; border-width: 1">
          <span lang="en-us">ESC</span>返回</td>
        </tr>
      </table>
      </td>
    </tr>
    <tr>
      <td width="100%">
      <p align="center">

            <object id=MediaPlayer1 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 width=468 height=358>
              <param name="filename" value=/film/play.asp>
              <param name="AutoStart" value="-1">
              <param name="Enabled" value="-1">
              <param name="ShowControls" value="-1">
              <param name="ShowGotoBar" value="0">
              <param name="ShowStatusBar" value="-1">
              <param name="EnableFullScreenControls" value="0">
              <param name="EnablePositionControls" value="0">
              <param name="Volume" value="0">
              <param name="DisplaySize" value="4">
              <param name="SendErrorEvents" value="0">
              <param name="enableContextMenu" value="0">
              <param name="EnableTracker" value="-1">
              <param name="AudioStream" value="-1">
              <param name="AutoSize" value="0">
              <param name="AnimationAtStart" value="-1">
              <param name="AllowScan" value="-1">
              <param name="AllowChangeDisplaySize" value="-1">
              <param name="AutoRewind" value="0">
              <param name="Balance" value="0">
              <param name="BaseURL" value>
              <param name="BufferingTime" value="5">
              <param name="CaptioningID" value>
              <param name="ClickToPlay" value="-1">
              <param name="CursorType" value="0">
              <param name="CurrentPosition" value="-1">
              <param name="CurrentMarker" value="0">
              <param name="DefaultFrame" value>
              <param name="DisplayBackColor" value="0">
              <param name="DisplayForeColor" value="16777215">
              <param name="DisplayMode" value="0">
              <param name="InvokeURLs" value="-1">
              <param name="Language" value="-1">
              <param name="Mute" value="0">
              <param name="PlayCount" value="1">
              <param name="PreviewMode" value="0">
              <param name="Rate" value="1">
              <param name="SAMILang" value>
              <param name="SAMIStyle" value>
              <param name="SAMIFileName" value>
              <param name="SelectionStart" value="-1">
              <param name="SelectionEnd" value="-1">
              <param name="SendOpenStateChangeEvents" value="-1">
              <param name="SendWarningEvents" value="-1">
              <param name="SendKeyboardEvents" value="0">
              <param name="SendMouseClickEvents" value="0">
              <param name="SendMouseMoveEvents" value="0">
              <param name="SendPlayStateChangeEvents" value="-1">
              <param name="ShowCaptioning" value="0">
              <param name="ShowAudioControls" value="-1">
              <param name="ShowDisplay" value="0">
              <param name="ShowPositionControls" value="-1">
              <param name="ShowTracker" value="-1">
              <param name="TransparentAtStart" value="0">
              <param name="VideoBorderWidth" value="0">
              <param name="VideoBorderColor" value="0">
              <param name="VideoBorder3D" value="0">
              <param name="WindowlessVideo" value="0">
            </object>

      </td>
    </tr>
  </table>

还有一种我在网上找的,没有用,不过楼主好像说功能好用,呵呵。

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer1" width="580" height="435">
<param name="AudioStream" value="-1">
<param name="AutoSize" value="0">
<param name="AutoStart" value="-1">
<param name="AnimationAtStart" value="-1">
<param name="AllowScan" value="-1">
<param name="AllowChangeDisplaySize" value="-1">
<param name="AutoRewind" value="0">
<param name="Balance" value="0">
<param name="BaseURL" value>
<param name="BufferingTime" value="5">
<param name="CaptioningID" value>
<param name="ClickToPlay" value="-1">
<param name="CursorType" value="0">
<param name="CurrentPosition" value="-1">
<param name="CurrentMarker" value="0">
<param name="DefaultFrame" value>
<param name="DisplayBackColor" value="0">
<param name="DisplayForeColor" value="16777215">
<param name="DisplayMode" value="0">
<param name="DisplaySize" value="2">
<param name="Enabled" value="-1">
<param name="EnableContextMenu" value="-1">
<param name="EnablePositionControls" value="-1">
<param name="EnableFullScreenControls" value="0">
<param name="EnableTracker" value="-1">
<param name="Filename" value="http://www.blogerhome.com/videos/刘德华-缺憾美.mpg">
<param name="InvokeURLs" value="-1">
<param name="Language" value="-1">
<param name="Mute" value="0">
<param name="PlayCount" value="1">
<param name="PreviewMode" value="0">
<param name="Rate" value="1">
<param name="SAMILang" value>
<param name="SAMIStyle" value>
<param name="SAMIFileName" value>
<param name="SelectionStart" value="-1">
<param name="SelectionEnd" value="-1">
<param name="SendOpenStateChangeEvents" value="-1">
<param name="SendWarningEvents" value="-1">
<param name="SendErrorEvents" value="-1">
<param name="SendKeyboardEvents" value="0">
<param name="SendMouseClickEvents" value="0">
<param name="SendMouseMoveEvents" value="0">
<param name="SendPlayStateChangeEvents" value="-1">
<param name="ShowCaptioning" value="0">
<param name="ShowControls" value="-1">
<param name="ShowAudioControls" value="-1">
<param name="ShowDisplay" value="0">
<param name="ShowGotoBar" value="0">
<param name="ShowPositionControls" value="-1">
<param name="ShowStatusBar" value="-1">
<param name="ShowTracker" value="-1">
<param name="TransparentAtStart" value="0">
<param name="VideoBorderWidth" value="0">
<param name="VideoBorderColor" value="0">
<param name="VideoBorder3D" value="0">
<param name="Volume" value="-40">
<param name="WindowlessVideo" value="0">
</object>
这个功能比较完整,支持原有的快捷键以及右键菜单

    2、real player全屏的方法一

realplayer播放4(带视频)
<SCRIPT language=javascript>
Real='document.RAOCX.'
function DoPlay()
{eval(Real+'DoPlay()');}
function DoStop()
{eval(Real+'DoStop()');}
function DoPlayPause()
{eval(Real+'DoPlayPause()');}
function SetFullScreen()
{
eval(Real+'SetFullScreen()');
fullscreen=true;
DoPlayPause();
DoPlay();
}
function GetFullScreen()
{
if(eval(Real+'GetFullScreen()'))
return true;
else
return false;
}
</SCRIPT>

<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX width=376 height=248>
<PARAM NAME=SRC VALUE="../upload/<%=rsp("path")%>">
<PARAM NAME=CONSOLE VALUE=Clip1>
<PARAM NAME=CONTROLS VALUE=imagewindow>
<PARAM NAME=AUTOSTART VALUE=true></OBJECT><br/>
<OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=24 id=video2 width=376>
<PARAM NAME=SRC VALUE="../upload/<%=rsp("path")%>">
<PARAM NAME=AUTOSTART VALUE=-1>
<PARAM NAME=CONTROLS VALUE=controlpanel>
<PARAM NAME=CONSOLE VALUE=Clip1></OBJECT>

<a href="#" title="全屏幕欣赏,按ESC键还原。" style="CURSOR: hand" onclick=SetFullScreen()>□全屏播放□</a>

    3、real player全屏的方法二

<html>
<head>
<title>在线播放</title>
<SCRIPT>
<!--
function bookmarkit(){window.external.addFavorite('http://lipingtao.jblog.cn/','魔幻天空')}
//-->
</SCRIPT>
</head>
<body marginwidth="0" leftmargin="0" topmargin="0" bgcolor="#000000" scroll="no" oncontextmenu="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false">
<script language="JAVASCRIPT">
<!-- Begin
var ap_name = navigator.appName;
var ap_vinfo = navigator.appVersion;
var ap_ver = parseFloat(ap_vinfo.substring(0,ap_vinfo.indexOf('(')));

var time_start = new Date();
var clock_start = time_start.getTime();
var dl_ok=false;

function init ()
{
if(ap_name=="Netscape" && ap_ver>=3.0)
dl_ok=true;
return true;
}

function get_time_spent ()
{
var time_now = new Date();
return((time_now.getTime() - clock_start)/1000);
}

function show_secs ()
{
var i_total_secs = Math.round(get_time_spent());
var i_secs_spent = i_total_secs % 60;
var i_mins_spent = Math.round((i_total_secs-30)/60);
var s_secs_spent = "" + ((i_secs_spent>9) ? i_secs_spent : "0" + i_secs_spent);
var s_mins_spent = "" + ((i_mins_spent>9) ? i_mins_spent : "0" + i_mins_spent);
document.fm0.time_spent.value = s_mins_spent + ":" + s_secs_spent;
window.setTimeout('show_secs()',1000);
}
init();
window.setTimeout('show_secs()',1);
//  End -->
          </script>
<center>
<p></p>
</center>
<div align="center">
  <center>
  <table border="0" cellspacing="0" width="337" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
    <tr>
      <td width="100%">
      <table border="0" cellspacing="0" style="border-collapse: collapse" width="108%" id="AutoNumber1" bgcolor="#F0F0F0" cellpadding="0">
        <tr>
          <td width="55%" height="1" bgcolor="#E0E0E0">
          <p align="left"> <font size="2">谢谢你的访问!!!!!</font></td>
          <form name="fm0" >
            <td width="7%" height="1" bgcolor="#E0E0E0">
            <input type="text" name="time_spent" size="5" style="border-style: groove; border-width: 1; background-color: #EEEEEE"></td>
          </form>
          <script language="JavaScript">
    <!--

    var Real;
    Real='document.RP1.';
    var Mute=false;
    var CanSetPos=true;
    var SetPosStart=false;
    var SetVolStart=false;
    var loop, timer, initialised;
    var speed=50;
    var oldwidth=566,oldheight=502;

    function DoFull()
{//全屏播放
eval(Real+'SetFullScreen()');
}

NetShowServer = "" ;

var mPath = NetShowServer + "";

function LoadVideo(c1,c2) {
 if (c1=="") return;
 video_filename = c1;

 MusicPlayer.Cancel()
 timer=window.setTimeout("video_play()",2000)
}
function video_play(fn) {
 var mName = mPath + video_filename;
 MusicPlayer.Open(mName)
}
    //-->
          </script>
          <td width="38%" height="1" bgcolor="#E0E0E0">
          <input type="button" value="全屏显示" style="border-style: ridge; border-width: 1">
                <span lang="en-us"><font size="2">ESC</font></span><font size="2">返回</font></td>
        </tr>
      </table>
      </td>
    </tr>
    <tr>
        <td width="100%"> <p align="center">
            <object id="RP1" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width=468 height=358>
  <param name="_ExtentX" value="4445">
<param name="_ExtentY" value="3334">
<param name="AUTOSTART" value="-1">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="-1">
<param name="SRC" value="rtsp://61.177.95.61:554/ent/2005/promise_1104.rm">
<param name="CONTROLS" value="Imagewindow,StatusBar,ControlPanel">
<param name="CONSOLE" value="clip1">
<param name="LOOP" value="0">
<param name="NUMLOOP" value="0">
<param name="CENTER" value="0">
<param name="MAINTAINASPECT" value="0">
<param name="BACKGROUNDCOLOR" value="#000000"><embed src="rtsp://61.177.95.61:554/ent/2005/promise_1104.rm" type="audio/x-pn-realaudio-plugin">
</object>
        </td>
    </tr>
  </table>
  </center>
</div>
</body>
</html>

    4、real player全屏的方法三

如果是realone要全屏只要HEAD加入以下这段JS代码
function setFull()
{
if(!document.playfull.CanStop())
{
alert("影片未开始播放无法切换为全屏模式")
}
else
{
alert("点击确定按钮后进入全屏播放模式,在全屏播放模式中按 Esc 键退出全屏模式")
document.playfull.SetFullScreen()
}
}
//-->
</script>
在body入面
<a href="#" >全屏</a>

时间: 2024-11-17 19:55:45

网页播放器实现全屏的方法总结的相关文章

HTML5 video播放器全屏(fullScreen)方法实例

 HTML5 video播放器全屏(fullScreen)方法实例  首先来说,这个标题具有误导性,但这样设置改标题也是主要因为video使用的比较多 在html5中,全屏方法可以适用于很多html 元素,不仅仅是video 代码如下: <!doctype html> <html> <head> <meta charset="utf-8" /> <title>全屏问题</title> <meta http-e

网页播放器代码[最全的播放器使用教程]

教程|网页|播放器 常用网页播放器代码 我们在网页上看到的播放器无外乎WMP/RealOne/Macromedia Flash Player,其他的无非是面板不同,或者添加了其他控件,对于计算机上安装的一些播放器也都是编码和解码器的整合,其最核心的编码和解码技术是相同的.例如:网络上最流行的windows media流(asf,wma,wmv格式...),Real流(rm,rmvb...),还有MPEG系列编码格式(MP4/MP3格式...) Windows Media Video 是微软推出的

一位网友整理出来的网页播放器参数

网页 这几天架设了一个电影服务器,研究了很久,现在把一些网页播放器的参数含义整理出来,你别说,就这些参数还折腾了我好长时间,现在终于解决了,感谢各位网友,把它整理处理,也是为了以后好用! 网页播放器的参数含义 Windows Media Player 网页播放器 参数含义 (默认0为否,-1或1为是)<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer1" wi

网页播放器的参数含义 Windows Media Player 网页播放器 参数含义_网页播放器

(默认0为否,-1或1为是)<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer1" width="286" height="225">   <param name="AudioStream" value="-1">   <param name="A

网页播放器Object使用详解_网页播放器

一.代码<?XML:NAMESPACE PREFIX = O /> 复制代码 代码如下: <object ID="javademo" CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" HEIGHT="280" WIDTH="200"> <param name="AUTOSTART" value="0"&

javascript控制realplayer对象使用_网页播放器

复制代码 代码如下: <object ID="javademo" CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" HEIGHT="280" WIDTH="200">  <param name="AUTOSTART" value="0">  <param name="SHUFFLE"

通用网页播放器_网页播放器

网页播放器的参数含义 Windows Media Player 网页播放器 参数含义 (默认0为否,-1或1为是)<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer1" width="286" height="225">  <param name="AudioStream" value=&

网上比较常用的嵌入网页中的播放器代码收藏_网页播放器

例如:网络上最流行的windows media流(asf,wma,wmv格式...),Real流(rm,rmvb...),还有MPEG系列编码格式(MP4/MP3格式...) Windows Media Video 是微软推出的一种流媒体格式,它是在"同门"的ASF(Advanced Stream Format)格式升级延伸来得.在同等视频质量下,WMV格式的体积非常小,因此很适合在网上播放和传输.Windows Media Player9兼容所有格式的WMV,官方编码器是Window

如何实现java/jsp网页播放器

问题描述 现项目需要在网页中嵌入播放器,求解决方案!谢谢. 解决方案 解决方案二:<objectid="player"height="400"width="450"classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"><paramNAME="AutoStart"VALUE="1"><!--是否自动播放--&