RE: Windows Media Player ActiveX not playing again after stopping.
patricia8069_at_msn.com
Date: 11/02/04
- Previous message: Alessandro Angeli [MVP::DigitalMedia]: "Re: How to use IMpegAudioDecoder in C#"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Nov 2004 11:39:03 -0800
"rockstar1971" wrote:
> Hello. I’m getting pretty frustrated with Media Player right now. What I want
> to do is very simple, but I’m having a difficult time getting it to work.
>
> What I want to do:
> Build a simple Windows App that will play one song after another
> continuously. Each song is picked from a large volume of mp3 files. Very
> simple…play track 1…when track 1 ends, retrieve a new mp3 file and play it
> (track 2)…when track 2 ends, retrieve another new mp3 file and play it...etc.
> This should be super easy. However, Windows Media player isn’t cooperating.
>
> What I’ve built:
> I’ve created a C#.Net Windows Application and embedded the Windows Media
> Player 9 ocx in the main form. I can add a new track either through the
> currentPlaylist object, the currentMedia object or URL property. When I call
> the play() method, the file plays just fine. The problem I’m having is
> playing the next track once the current one has ended. I’m using the
> PlayStateChange event to set up the next track. I’ve tried putting my “get
> the new track” code is in both the wmppsMediaEnded and wmppsStopped states.
>
> I’ve tried changing the currentMedia or URL. When I do this the player just
> stops. If issue a new play() command, nothing happens.
>
> The only thing that works for me is to append a new item to the current
> playlist. The player just keeps on playing using the new playlist item. This
> gives me my desired result. However, this is an app that will be running for
> very long periods of time, so I would rather not keep adding items to the
> playlist. I’ve tried adding my new playlist item and then removing the
> previous one, but this causes the player to just stop and sit there.
>
> I’ve also tried using the currentMedia object. This doesn’t work at all.
> When either wmppsMediaEnded or wmppsStopped happens and I set the
> currentMedia to be a new track, the player stops, it just won’t play again. I
> can issue play() commands 100 times and nothing happens. I’ve verified that
> the new media exists in the currentMedia object. I get the same thing using
> the URL property.
>
> It seems so simple to me and I’m not sure what I’m missing.
>
> If anyone has any insight it would be very much appreciated. Thanks.
>
> -Scott
>
- Previous message: Alessandro Angeli [MVP::DigitalMedia]: "Re: How to use IMpegAudioDecoder in C#"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|