Solved

WindowsMediaPlayer1 Repeat Track

Posted on 2009-05-14
5
1,374 Views
Last Modified: 2012-05-07
Hi, I've been using the Windows Media Player imported from the library and what I'm having problems with is Repeating the Track.

now I've figured out the loop which is

form1.WindowsMediaPlayer1.settings.setMode('loop',true);

and I have tried this

form1.WindowsMediaPlayer1.settings.playCount:=0;

and

form1.WindowsMediaPlayer1.settings.playCount:=999;


though still it doesn't stay on the same track or repeat the track :( just goes to the next track..

any way of doing thing so it repeats the track active?

0
Comment
Question by:eNarc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 5

Expert Comment

by:wd123
ID: 24388507
setMode('loop',true); only form playlist, create your playlist with 1 files and you git it.
0
 
LVL 5

Author Comment

by:eNarc
ID: 24388822
lol create it with 1 file in the playlist, and loop that one ;) alright hehe I'll see what I can do :)
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 24395845
Write an OnNotify handle that when you are notified of a Stop, you reset and Play again.
0
 
LVL 26

Accepted Solution

by:
EddieShipman earned 500 total points
ID: 24396451
oops, TMEdiaPlayer has the OnNotify.
WindowsMediaPlayer has OnPlayStateChange. Check for wmppsStopped.


procedure TForm1.WMP1PlayStateChange(Sender: TObject;
  NewState: Integer);
begin
  if NewState = wmppsStopped then
  begin
    WMP1.controls.currentPosition := 0;
    WMP1.controls.play
  end;
end;

Open in new window

0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 24396537
Oh, BTW, I'm not sure how to keep it from playing if you stop in the middle. I suppose there's a way to capture which button was pressed and don't restart if the stop button was pressed.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question