Event fired when embed src video starts playing?

Discussion in 'Javascript' started by majestik, Jul 14, 2006.

  1. majestik

    majestik Guest

    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
    majestik, Jul 14, 2006
    #1
    1. Advertising

  2. majestik

    cwdjrxyz Guest

    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.
    cwdjrxyz, Jul 15, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Richter

    <txt src= ...> equivalent of <img src= ...>

    Steve Richter, Feb 8, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    2,058
    Laurent Bugnion
    Feb 9, 2006
  2. Greg Johnson
    Replies:
    4
    Views:
    3,047
  3. Replies:
    1
    Views:
    1,599
    Alex Hunsley
    Mar 23, 2007
  4. pheadxdll
    Replies:
    16
    Views:
    3,605
    Neredbojias
    Jun 6, 2007
  5. Soren Vejrum
    Replies:
    4
    Views:
    515
    Lasse Reichstein Nielsen
    Jul 5, 2003
Loading...

Share This Page