media player

R

Ringo

I'm using media player and I can load and play a playlist, but how do
I display the songs in the playlist?
I can choose a playlist using openfiledialog then put the name of the
chosen list in the Combobox CB_playlist. But how do I then get the
names out of the playlist to put in the textbox?



player.currentPlaylist =
player.mediaCollection.getByName(CB_playlist.Text);
textBoxList.Text = CB_playlist.Text;// name of playlist,
not contents
Thanks
Ringo
 
P

Peter Bromberg [C# MVP]

A playlist is just a little xml document. Here is a sample:

<?wpl version="1.0"?>
<smil>
<head>
<meta name="Generator" content="Microsoft Windows Media Player --
11.0.6000.6344"/>
<meta name="AverageRating" content="40"/>
<meta name="TotalDuration" content="521"/>
<meta name="ItemCount" content="2"/>
<title>Pete</title>
</head>
<body>
<seq>
<media src="..\3_-_Love_(For_Nat_Cole).mp3" />
<media src="..\5_-_Ways_Of_The_Hand.mp3"/>
</seq>
</body>
</smil>

-- you can see that the <seq> node has <media src=.... childnodes. So, you
probably could just try loading this into a DataSet with ReadXml and look for
the correct DataTable.

--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top