View Full Version : currentPosition - media player

Mar 12th, 2007, 11:41 PM
I'm having problems using javascript to seek to a certain position in a wmv file. The funny thing is, if I point to the wmv file on a streaming server it works, (Ex: mss://domain/file.wmv) but if I point to the same file locally it ignores that command. Does this command only work with streaming servers?

function seek(toc_item_num) {
wmplayer.controls.currentPosition = toc_item_num;

<A href="index.html#" onClick="seek(2186)">xxxxx</A>

type="application/x-oleobject" height="305" width="320"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" name="wmplayer">
<PARAM NAME="URL" VALUE="COO-2006-11-21.wmv">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="1">
<PARAM NAME="autoStart" VALUE="1">
<PARAM NAME="ShowStatusBar" VALUE="true">
<PARAM NAME="ShowControl" VALUE="true">
<PARAM NAME="SendErrorEvents" VALUE="1">
<PARAM NAME="enabled" VALUE="1">
<PARAM NAME="invokeURLs" VALUE="0">
<PARAM NAME="CurrentPosition" VALUE="0">

Mar 13th, 2007, 05:42 PM
I have used this a lot and it works for me. I am always running my code on a server but I have no idea if that makes a difference. My links are always relative. I wonder if it has to do with your PARAMS. I would try and take out each one by one and see if that makes a difference.

Your code looks good to me.