By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,341 Members | 1,693 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,341 IT Pros & Developers. It's quick & easy.

Event fired when embed src video starts playing?

P: n/a
Question, can I see an event in Javascript that tells me a video starts
playing using the <embed src="file.wmv>. I stream the video, but there
is a wait time and wanted to pop up a message telling the user it is
buffering until the video actually begins to play in the browser.

Thanks for any help!

JJ

Jul 14 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

majestik wrote:
Question, can I see an event in Javascript that tells me a video starts
playing using the <embed src="file.wmv>. I stream the video, but there
is a wait time and wanted to pop up a message telling the user it is
buffering until the video actually begins to play in the browser.
I will not help anyone use embed because it is not official html and
never has been. The modern method is to use object. Embed is an
unofficial hangover from the browser war era.

You can use code something like the below to insert the WMP into your
page:

<div style="text-align:center">
<object data="http://www.cwdjr.info/movie/cancanvbr.wvx"
type="video/x-ms-wvx" style="width:400px; height:309px">
<param name="src" value="http://www.cwdjr.info/movie/cancanvbr.wvx"
valuetype="ref" />
<param name="showcontrols" value="1" valuetype="data" />
<param name="showstatusbar" value="1" valuetype="data" />
<param name="autostart" value="0" valuetype="data" />
<param name="volume" value="0" valuetype="data" />
<param name="PlayCount" value="1" valuetype="data" />
</object>
</div>

Such code works on modern IE6, Firefox, Opera, Netscape, and Mozilla
browsers with the WMP installed.

The show status bar parameter displays a status bar at the bottom of
the player which indicates buffering and percentage thereof before the
streaming starts. I assume you are storing your .wmv video files on an
ordinary html server and not a special streaming server for which
somewhat different code may be needed. In other words, what you wish to
display is a built in part of the WMP if you decide to use it. The .wvx
files are standard WMP redirector(play list) files that can include
even several videos and will cause them to be played in sequence. The
..wvx files just point to where the .wmv video or videos are stored. If
the WMP is not installed, then you just get no player without problems.
If you want someone to be able to play or download the video in such a
case, you can provide a text link to the .wmv and say to click it if no
player appears. Then, depending on the settings of the viewing computer
and browser used, one may be offered to download the video, play the
video, or automatic playing may start. The recent Real, QT, and Winamp
players, as well as several other players for OSs that can not use such
players all will play some .wmv files if they are set up correctly. But
the WMP is prefered for a .wmv file if it is installed. At least in the
US nearly all of the main stream computers come with the WMP, Real,
and QT players installed as well as sometimes others. This may not be
the case in some regions of the world. Here you have to have both the
WMP and Real if you wish to view video content on many of the largest
sites that display video such as major newspaper sites, TV network
sites, etc.

Jul 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.