Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creat and play a playlist in QT or winmedia?

Status
Not open for further replies.

j183

Programmer
Mar 8, 2005
4
US

Hi All,

I'm trying to loop through a simple array of movie names and play them in either quicktime or windows media player when I push a button.

I'm using the quicktime component from the toolbox (previously tried with both shockwave and windows media with the same results).

It loops through the array and only plays the last movie.

I figure the only way to do it is to somehow create a play list and play the entire list.

Does anyone know how to do this? Or even another way to get the player to play more than one movie in sequence (seemlessly)?

Any help will be GREATLY appreciated.

Here's the code:

private void startMovies_Click(object sender, System.EventArgs e)
{

String[] aslMovies = {"poser1.mov", "poser2.mov", "poser3.mov", ENDWORD};
int loopcounter = 0;
String moviePath;

for (loopcounter = 0; aslMovies [loopcounter] != ENDWORD; loopcounter = loopcounter + 1)
{
moviePath = Directory.GetCurrentDirectory () + Path.DirectorySeparatorChar + aslMovies[loopcounter];
aslPlayer.SetURL (moviePath);
statusText.Text = "Now Playing: " + moviePath;
}

}

I've been dtruggling with this for days. Anyone out there know what to do???

Thanks,
john...
 
this is just a guess from a quick look at the quicktime site, but...

the SetUrl method replaces the current movie with the one specified in the url parameter.

looks asynchronous to me. it doesn't wait for the currently playing movie to finish before it starts the new one. that's why you only get the last one.

how about trying the SetQTNEXTUrl method instead?


mr s. <;)

 

Hi Mr. S,

Thanks for the suggestion. Tried it last night and it didn't work.

Can I ask where on the quicktime site you found those explanations?

I'm hoping the answer may be there somewhere.

thanks,
john...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top