Media Player Help * Locked

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts Page 1 of 1
Contributors
User avatar
tvs praveen
Top Poster
Top Poster
Posts: 205
Joined: Tue Dec 08, 2009 6:20 am

Media Player Help * Locked
tvs praveen
Hi, How to make Play Next, Play Previous, Shuffle, And audio mute code

Please help me clapper;

This problem has been solved by CodeNStuff wahooo;
Last edited by tvs praveen on Wed Feb 10, 2010 8:21 pm, edited 6 times in total.
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Hello,

You could use the followin to do what you need.

To repeat media:
Code: Select all
 AxWindowsMediaPlayer1.settings.setMode("loop", True)


Stop repeat:
Code: Select all
 AxWindowsMediaPlayer1.settings.setMode("loop", False)
Play next media:
Code: Select all
AxWindowsMediaPlayer1.Ctlcontrols.next()
To "shuffle" media in a listbox I guess you could use this to select a random item from it:
Code: Select all
Dim TrackRandom As Integer
            TrackRandom = Int((ListBox1.Items.Count) * Rnd())
            AxWindowsMediaPlayer1.URL = (ListBox1.Items(TrackRandom))
You will need to add some of your own code to make it play a random track automatically when the player stops playing or something like that. Im not sure what you mean by preview :?

Happy coding cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

I think he means a little snippet of the song, so they know before they play or something? But in a snippit you could Like Put media play and also start a timer with intervel of 5000 (5 seconds) and in the timer put the code stop the audio and stop the timer, i will just put that into code now :D
Image
User avatar
Coden
Member
Member
Posts: 35
Joined: Wed Dec 09, 2009 7:31 am

Here is 2 simpel codes.

Add a track bar, set value to 5.
Code;
AxWindowsMediaPlayer1.settings.Volume = Trackbar1.Value

Add CheckBox, set Checked to false.
Code;
If Checkbox1.checked = true then
AxWindowsMediaPlayer1.settings.mute
else
'Do Nothing
End if

regards.
regards.
4 posts Page 1 of 1
Return to “Tutorial Requests”