I am creating a simple media player with Silverlight 4 (C #). Now I am using MediaElement, but it gives me an error
error 4001: .... System.Collections.ListDictionaryInternal
Now this error occurs when I want to set the MediaElement source. Therefore, when the user clicks "Play", he sets the source of the first song.
Song s = afspeelijst.ElementAt(currentPlayingIndex);
media.Source = new System.Uri(s.FilePath);
media.Position = TimeSpan.Zero;
media.Play();
The following code also does not work, but it removes the error. But still, there is no sound: s
media.SetSource(new FileStream(s.FilePath, FileMode.Open));
source
share