蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程


    

蓝森林 http://www.lslnet.com 2006年8月25日 8:28

全屏和重播怎么实现

我用以下的代码实现重播和全屏,可是并不能实现.盼解决:
重播:
<div style="cursor:hand" onClick="document.MediaPlayer1.CurrentPosition=0,document.MediaPlayer1.AutoStart=-1;" align="right">重播</div>
全屏:
<div style="cursor:hand" onClick="document.MediaPlayer1.WindowlessVideo=0;" align="right">全屏</div>


在顶

顶!!!

试试:
[code]<div style="cursor:hand" onClick="document.MediaPlayer1.CurrentPosition=0,document.MediaPlayer1.Play();" align="right">重播</div>[/code]

嗯..重播的问题解决了.但是全屏的问题还没解决!!望盼

一个小提议


function opennew(){
var popup = window.open('new.html','windowName','fullscreen=1,top=0,left=0,directories=0,width=1024,height=768,location=0,menubar=0,scrollbars=0,status=0,toolbar=0');
popup.focus();
//if (!popup.opener) popup.opener = self;
}

这样做不行呀.我不是打开一个全屏页面.我是要MTV全屏显示.还望大虾吗再看看?
PS:也许是因为我太菜,悟不到你说的那种方法.给个演示最好

确实是菜菜
[code]
function opennew(){
var popup = window.open(document.MediaPlayer1.fileName,'windowName','fullscreen=1,top=0,left=0,directories=0,width=1024,height=768,location=0,menubar=0,scrollbars=0,status=0,toolbar=0');
popup.focus();
}
[/code]

不行呀..好像他只是调用机子本身的播放器.不是在页面里全屏显示.
我的代码如下:
<script>
function opennew(){
var popup = window.open(document.MediaPlayer1.filename,'windowName','fullscreen=1,top=0,left=0,directories=0,width=1024,height=768,location=0,menubar=0,scrollbars=0,status=0,toolbar=0');
popup.focus();
}
</script><div style="cursor:hand" onClick="opennew();">全屏</div>

随便怎么写都可以啦.....试试

[code]
function opennew(){
  document.write(document.all("MediaPlayer1").outerHTML);
  document.close();
}
[/code]

不行不行..
按您上面说的那种方法不能播放,播放面板里全部为灰色,不可用.还有也不是全屏显示

来人呀!!

[html]
<object id="player" height="240" width="320" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" standby="稍等...">
    <param name="stretchToFit" value="1">
    <param NAME="EnableContextMenu" VALUE="0">
    <param name="enabled" value="0">
    <param NAME="AutoStart" VALUE="-1">
    <param NAME="url" VALUE="http://www.xk57.com/music/vip/z-star.wmv">
    <param name="uiMode" value="none">
    <param name="windowlessVideo" value="0">
    <param name="fullScreen" value="1">
</object>
[/html]

如果网速慢要等一会才能看到效果
[html]
<script type="text/javascript">
function toFull(){
var thisvalue=""
thisvalue +="<object id=player height=240 width=320 classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6>"
thisvalue +="<param name=stretchToFit value=1>"
thisvalue +="<param NAME=EnableContextMenu VALUE=0>"
thisvalue +="<param name=enabled value=0>"
thisvalue +="<param NAME=AutoStart VALUE=-1>"
thisvalue +="<param NAME=url VALUE=http://www.xk57.com/music/vip/z-star.wmv>"
thisvalue +="<param name=uiMode value=none>"
thisvalue +="<param name=windowlessVideo value=0>"
thisvalue +="<param name=fullScreen value=1>"
thisvalue +="</object>"
disp.innerHTML=thisvalue;
}
</script>
<div style="width:200px;height:24px;line-height:24px;background:gray;" onclick="toFull()" id="disp">click me for fullscreen</div>
[/html]

加上你要的按钮
[html]
<script type="text/javascript">
function toFull(){
var thisvalue=""
thisvalue +="<object id=player height=240 width=320 classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6>"
thisvalue +="<param name=stretchToFit value=1>"
thisvalue +="<param NAME=EnableContextMenu VALUE=0>"
thisvalue +="<param name=enabled value=0>"
thisvalue +="<param NAME=AutoStart VALUE=-1>"
thisvalue +="<param NAME=url VALUE=http://www.xk57.com/music/vip/z-star.wmv>"
thisvalue +="<param name=uiMode value=none>"
thisvalue +="<param name=windowlessVideo value=0>"
thisvalue +="<param name=fullScreen value=1>"
thisvalue +="</object>"
disp.innerHTML=thisvalue;
}
</script>
<div style="width:200px;height:24px;line-height:24px;background:gray;" onclick="toFull()" id="disp">点击我开始播放</div>
<div  style="width:200px;height:24px;line-height:24px;background:green;" onclick="player.fullscreen='1'">full</div>
[/html]

嗯。这种方法可以。。
但是我想问一下能为能用你的第一种方法实现全屏。不用js

[code]
<object id="player" height="240" width="320" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" standby="稍等...">
    <param name="stretchToFit" value="1">
    <param NAME="EnableContextMenu" VALUE="0">
    <param name="enabled" value="0">
    <param NAME="AutoStart" VALUE="-1">
    <param NAME="url" VALUE="http://www.xk57.com/music/vip/z-star.wmv">
    <param name="uiMode" value="none">
    <param name="windowlessVideo" value="0">
    <param name="fullScreen" value="1">
</object>
[/code]
[code]
<div  style="width:200px;height:24px;line-height:24px;background:green;" onclick="player.fullscreen='1'">full</div>
[/code]
你把 这两个放一个网页里边不就行了嘛?

嗯。。是可以,是两个不同的ID号。
另:
我求“CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"多媒体的参娄列表。

顶一下

没人有吗?

在没人应我就让贴子沉了




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com