Sign in to follow this  
Followers 0
Champak

Playlist and time format problems.

4 posts in this topic

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

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Bump,

Still looking for an answer for something that will do an If currentmedia exists.

Share this post


Link to post
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
Sign in to follow this  
Followers 0