title: Stream video from isolated storage in wp7
body: <p>I'm trying to make some wp7 app which should play videos from server.
  One of the app's features is downloading selected videos and playing them from isolated storage.</p>
  
  <p>I'm using next code for downloading:</p>
  
  <pre><code>WebClient wc = new WebClient();
  wc.OpenReadCompleted += (s, a) =&gt; { /* saving result stream to isolated storage */}
  wc.OpenReadAsync(fileUri);
  </code></pre>
  
  <p>So, when I click on play button, I check if file was downloaded or not, and if it was I open IsolatedStorageFileStream for this file and set it to player's source, otherwise I set to source file Uri.</p>
  
  <p>Problem is that I get MediaFailed exception when I'm trying to set IsolatedStorageFileStream as MedialElement's source. Can anybody help me with it?</p>
  
  <p>Code looks like in next way</p>
  
  <pre><code>private IsolatedStorageFile isf;
  private IsolatedStorageFileStream stream;
  
  private void playButton_Click(..)
  {
  isf = IsolatedStorageFile.GetUserStoreForApplication();
  stream = isf.OpenFile(path, FileMode.Open);
  MediaPlayer.SetSource(stream);
  MediaPlayer.Play();
  }
  </code></pre>
  
  <p>Stream is not corrupted, its length is correct. I realy don't know what to do with it.
  Thanks in advance</p>