Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
4th August 2007, 19:13 | #1241 | Link |
Registered User
Join Date: Jul 2003
Posts: 179
|
Does anyone know how to get the current position with Mediaplayer Classic using javascript? I'm using a remote control software and trying to configure an OSD display but I have had no luck getting it to work with commands like CurrentPosition, GetCurrentPosition, SeekTime, Time, all are unrecognised.. Even FileName was not known but I did figure out Name worked as filename normally would.
|
4th August 2007, 22:01 | #1242 | Link | |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
Also, that didn't work... what are "CurrentPosition", "GetCurrentPosition" etc. and where did you get those? np: Retina.IT - Pick (Semeion)
__________________
now playing: [artist] - [track] ([album]) |
|
5th August 2007, 00:04 | #1243 | Link | |
Registered User
Join Date: Jul 2003
Posts: 179
|
Quote:
Code:
title=""; if (wmp.HasMultipleItems) title=wmp.GetMediaInfoString(8); if (title=="") { title=wmp.Name; if (title.lastIndexOf("\\")!=-1) title=title.substr(title.lastIndexOf("\\")+1); if (title.lastIndexOf(".")!=-1) title=title.substr(0,title.lastIndexOf(".")); } len=0; if (wmp.IsDurationValid) { len=wmp.Duration; lenhours=Math.floor(len/3600); lenmins=Math.floor(len%3600/60); lensecs=Math.floor(len%60); lenstr=lenhours+":"+(lenmins<10?"0"+lenmins:lenmins)+":"+(lensecs<10?"0"+lensecs:lensecs); } pos=wmp.CurrentPosition; poshours=Math.floor(pos/3600); posmins=Math.floor(pos%3600/60); possecs=Math.floor(pos%60); posstr=poshours+":"+(posmins<10?"0"+posmins:posmins)+":"+(possecs<10?"0"+possecs:possecs); if (len) { pos=100/len*pos; OSD.Show(osdProgress,posstr+" ("+lenstr+") "+title,pos); } else Alert(posstr+"\n"+title); |
|
5th August 2007, 02:43 | #1244 | Link | |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
So whatever was possible with Media Player 6.4 isn't automatically possible with MPC.
__________________
now playing: [artist] - [track] ([album]) |
|
5th August 2007, 11:44 | #1246 | Link |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
How about posting all the code, especially the part where you assign something to wmp? And still, I very much doubt MPC does anything like Media Player, so this is just not going to work...
__________________
now playing: [artist] - [track] ([album]) |
Tags |
media player classic |
Thread Tools | Search this Thread |
Display Modes | |
|
|