Jump to content

Playlist and time format problems.


Champak
 Share

Recommended Posts

I've given up trying to manipulate WMP so I've decided to just make my own player using WMPlayer object and grab WMP playlist.

Playlist problem: Advance to the next song:

During playing of a playlist I can't get the song to go to the next song when the current one is finished. If I try to do If $oPlayer.controls.currentPosition() = $oPlayer.currentMedia.duration() Then, that will fail sometimes do to loop timing. If I do If $oPlayer.controls.currentPosition() = 0 because the song resets at the end, that will cause me to skip to the next song every time I press STOP. I cant seem to get MediaEnded to work. So Im stuck. How do I advance to the next song in an array playlist at the end of a song?

Formatting problem:

Also, how do I convert $oPlayer.controls.currentPosition() and $oPlayer.currentMedia.duration() to minutes and seconds instead of just seconds?

Thanks

Link to comment
Share on other sites

Also, is there a way to detect if there is/isn't a current media? I'm getting errors in certain functions I want to make, and I have to make a bunch of cumbersome workarounds. So basically what I want to do is something like

"IF $oPlayer.currentMedia exists"

Link to comment
Share on other sites

OK, resolved all issues, just posting solution if anyone else has the problem.

Skip to the next song in the playlist:

My original idea concept was on the right track, but didn't work, I believe, because I didn't have both duration and current time rounded and formatted. Well I formatted and rounded both times and it works as expected. That being, I put:

"If currentpositon = duration Then". I put that at the end of the While1 loop. However this does fail occasionally, especially if the computer hickups; so a better solution would be appreciated.

Time format:

http://www.autoitscript.com/forum/index.ph...post&p=2970

If currentmedia exists:

I didn't find an answer to this, instead what I did is just on start up load the previously called playlist and auto play. This works great, but I'd still like an answer if this is possible or not.

Edited by Champak
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...