在网页中用RealPlayer 控件播放电影,javascript怎样用 RealPlayer 事件来知道电影已播放完毕?

gtkknd 2007-04-08 08:25:35
在网页中用RealPlayer 控件播放电影,javascript怎样用 RealPlayer 事件来知道电影已播放完毕?
...全文
235 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
haoyoul 2007-10-10
  • 打赏
  • 举报
回复
<OBJECT ID=player CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH=320 HEIGHT=240>
<PARAM NAME="SRC" VALUE="http://djmusic.hahadj.com/dj00/zw/51/16.rm">
<param name=CONTROLS vlaue=all>
</OBJECT>
<script for=player event=OnPlayStateChange(newstate)>
if(newstate == 0)
location.href="qidizi.html";
</script>

OnPlayStateChange Sent when the play state of the presentation in RealPlayer changes. OnPlayStateChange(int32 old_state, int32 new_state) Warning!
When programming an ActiveX control, t
he old_state parameter is not available. T
he proper syntax is: OnPlayStateChange(int32 new_state).
If your ActiveX application requires both the old_state and new_state parameters,
use the OnStateChange callback instead.
old_state The previous play state.
new_state The current play state.
The following table lists the possible values for the old_state and new_state parameters: Parameter Values for the Possible Play States Parameter Value Play State 0 Stopped 1 Contacting 2 Buffering 3 Playing 4 Seeking Returns void
haoyoul 2007-10-10
  • 打赏
  • 举报
回复
楼上说的不对,要是看电影 的人有事停了一会,你的时间计算不是不准了,
2.你如何得到时间,

<script FOR="MediaPlayer1" EVENT="PlayStateChange(lOldState, lNewState)" LANGUAGE="JScript">
if(MediaPlayer1.playState==3)
{

}

这个应该是对的,但是mplayer,改成real的就行了
suloeveryday 2007-04-08
  • 打赏
  • 举报
回复
这个就难了,你可以设计时先输入每个影片的时间值,再用JAVASCRIPT来判断,到了这个时间,延时几秒就再跳到别的页面去或者处理别的程序。

----------------------------------------------------------------------
为感谢各位帮忙,我常上这些兼职项目网站赚点外块的,呵呵。大家一起分享一下。
http://www.sp339.com 小项目论坛

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧