0
private void mediaPlayer_Enter()
{
    string path = Path.GetFullPath(currentTrack.Text);
    System.Diagnostics.Debug.WriteLine(path);
    mediaPlayer.URL = path;
    mediaPlayer.Ctlcontrols.play();
}

This is the piece of code which is being called when the state of the media player turns to "media ended". I know that it does execute that line of code but it still doesn't play. It takes the item out of the listbox (which is the playlist) and loads it into the mediaPlayer but does not AUTOMATICALLY play the song. I have to press the button to start playing it - it has do play it straight away by itself. What am I doing wrong?

user247702
  • 23,641
  • 15
  • 110
  • 157
Maynn
  • 515
  • 1
  • 6
  • 10
  • possible duplicate of [Windows Media Player ctlcontrols.play and url dont work](http://stackoverflow.com/questions/22969315/windows-media-player-ctlcontrols-play-and-url-dont-work) – pennstatephil Apr 09 '14 at 19:28
  • I have posted again because the other one seems to be burried and I have spent all day trying to solve this... – Maynn Apr 09 '14 at 19:31
  • There are ways to get your question more attention, duplicating is spammy. Please see http://stackoverflow.com/help/duplicates. – pennstatephil Apr 09 '14 at 19:35

0 Answers0