1

In C#, I'm using both the DotNetZip and the System.Windows.Media I have a zip file that contains some songs, and I want to play them directly from the zip file without having to extract them ..

Now I manged to get a stream to the sound file:

Stream stream = zip["Songs\\IronMaiden\\Song1.mp3"].OpenReader();

but the problem is, that the MediaPlayer.Open method only takes Uri as a parameter it doesn't take a stream ..

How Can I get around this ? Knowing that I can't switch to any other media options like fmod.dll nor anything else. I'll also said it again, I don't want to extract them.

Any help would be appreciated .. Thanks in advance .. :)

vexe
  • 5,433
  • 12
  • 52
  • 81

1 Answers1

1

If the media player you want to use does not take a stream, there is no way to do it. As has been mentioned, you'll have to save the file and use a URL to the saved file location. Otherwise, find another media player that works with a stream.

Peter Ritchie
  • 35,463
  • 9
  • 80
  • 98