Markers in Media Player 7 ?

Discussion in 'ASP .Net Web Controls' started by Trevor Daniel, Apr 16, 2004.

  1. Hello,

    I have been trying to make an embedded Windows Media Player jump to a fro between markers in a streamed file.

    I have found that if i embed the 6.4 player, then my javascript works perfectly. If i embed the verion 7 player, the javascript says there are no markers in the file. I am using the following javascript to access the markers.

    Any help ideas would be appreciated on what could be the cause and solution.

    Thanks

    Trevor

    function seekToMarker(iWhichMarker){
    if ((navigator.userAgent.indexOf("IE") > -1) && (navigator.platform == "Win32")) {
    // This is an error handler. If the user tries to scan to a marker which doesn't
    // exist, the player will pop an error message. By using this code, we
    // can create a custom error message.
    if (iWhichMarker <= document.Player.MarkerCount) {
    // This resets the current marker in the file.
    document.Player.CurrentMarker = iWhichMarker;
    document.Player.Play();
    } else {
    alert("This Marker doesn't exist. (No Markers were found!)");
    }
    } else {
    if (iWhichMarker <= document.Player.GetMarkerCount()) {
    document.Player.SetCurrentMarker(iWhichMarker);
    document.Player.Play();
    } else {
    alert("This Marker doesn't exist. (Markers were found!)");
    }

    }
    }
    </SCRIPT>

    And the code used to emded the object is:

    <OBJECT id="Player" style="Z-INDEX: 112; LEFT: 16px; WIDTH: 320px; POSITION: absolute; TOP: 216px; HEIGHT: 305px"
    classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT><PARAM NAME="URL" VALUE="Home_To_Work.asx"><PARAM NAME="rate" VALUE="1"><PARAM NAME="balance" VALUE="0"><PARAM NAME="currentPosition" VALUE="0"><PARAM NAME="defaultFrame" VALUE=""><PARAM NAME="playCount" VALUE="1"><PARAM NAME="autoStart" VALUE="-1"><PARAM NAME="currentMarker" VALUE="0"><PARAM NAME="invokeURLs" VALUE="-1"><PARAM NAME="baseURL" VALUE=""><PARAM NAME="volume" VALUE="50"><PARAM NAME="mute" VALUE="0"><PARAM NAME="uiMode" VALUE="full"><PARAM NAME="stretchToFit" VALUE="0"><PARAM NAME="windowlessVideo" VALUE="0"><PARAM NAME="enabled" VALUE="-1"><PARAM NAME="enableContextMenu" VALUE="-1"><PARAM NAME="fullScreen" VALUE="0"><PARAM NAME="SAMIStyle" VALUE=""><PARAM NAME="SAMILang" VALUE=""><PARAM NAME="SAMIFilename" VALUE=""><PARAM NAME="captioningID" VALUE=""><PARAM NAME="enableErrorDialogs" VALUE="0"><PARAM NAME="_cx" VALUE="8467"><PARAM NAME="_cy" VALUE="8070"></OBJECT>
    Trevor Daniel, Apr 16, 2004
    #1
    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. cyshao
    Replies:
    1
    Views:
    3,294
    Steve C. Orr [MVP, MCSD]
    Apr 12, 2005
  2. steven robinson
    Replies:
    0
    Views:
    628
    steven robinson
    Nov 9, 2003
  3. ary
    Replies:
    1
    Views:
    1,064
    =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=
    Nov 28, 2006
  4. HY Tech
    Replies:
    0
    Views:
    595
    HY Tech
    Sep 7, 2003
  5. Adam Akhtar
    Replies:
    11
    Views:
    224
    David A. Black
    Mar 17, 2008
Loading...

Share This Page