-
December 25th, 2010, 05:55 AM
#1
How to completely reset MediaElement?
I have to change source frequently, like below:
// Movie is a MediaElement in xaml, and loadbehavior is manual. all path are valid.
ChangeMovie(string path)
{
Movie.Close();
Movie.Source = new Uri(path, UriKind.Relative);
Movie.Play();
}
// in some place, just call ChangeMovie() at certain time, feeding different path.
Sometimes, MediaOpened is not fired at all, and movie can't be played after that, BufferingProgress is always 0. Why that happens?
In this situation, how can I completely reset the mediaelement?
thanks in advance!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|