R
Ringo
I'm trying to use windows media player in an app. I can give it an mp3
and it plays it, but if I give it a playlist it will not play and even
the play button on the control is not active.
btn_open_mediaFile works fine,
tn_open_playlist acts likes nothing happened except I see the name of
the playlist. What am I missing?
Also, if an mo3 is playing, loading a playlist stops it from playing.
here is my code
private void btn_open_mediaFile_Click(object sender, EventArgs
e)
{
openFileDialog1.Filter = "music|*.mp3";
openFileDialog1.ShowDialog();
string filename = openFileDialog1.FileName;
player.URL = filename;
}
private void btn_open_playlist_Click(object sender, EventArgs
e)
{
openFileDialog1.Filter = "playlists|*.wpl";
openFileDialog1.ShowDialog();
string filename = openFileDialog1.FileName;
player.currentPlaylist =
player.mediaCollection.getByName(filename);
currentPlaylistLabel.Text = ("Found first playlist. Name =
" + player.currentPlaylist.name);
player.Ctlcontrols.play();// does not work with or without
this line
}
any help would be greatly appreciated
Thanks
Ringo
and it plays it, but if I give it a playlist it will not play and even
the play button on the control is not active.
btn_open_mediaFile works fine,
tn_open_playlist acts likes nothing happened except I see the name of
the playlist. What am I missing?
Also, if an mo3 is playing, loading a playlist stops it from playing.
here is my code
private void btn_open_mediaFile_Click(object sender, EventArgs
e)
{
openFileDialog1.Filter = "music|*.mp3";
openFileDialog1.ShowDialog();
string filename = openFileDialog1.FileName;
player.URL = filename;
}
private void btn_open_playlist_Click(object sender, EventArgs
e)
{
openFileDialog1.Filter = "playlists|*.wpl";
openFileDialog1.ShowDialog();
string filename = openFileDialog1.FileName;
player.currentPlaylist =
player.mediaCollection.getByName(filename);
currentPlaylistLabel.Text = ("Found first playlist. Name =
" + player.currentPlaylist.name);
player.Ctlcontrols.play();// does not work with or without
this line
}
any help would be greatly appreciated
Thanks
Ringo