Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Media Element gets Exception from HRESULT: 0x8898050C when trying to change SpeedRatio
3 replies. Latest Post by Ryppl on August 30, 2008.
(0)
Ryppl
Member
0 points
8 Posts
08-25-2008 4:12 PM |
Hi,
I'm using VS 2008, no service pack, and Silverlight 1.0 in a WPF application and a MediaElement with images simulating buttons.
When a video is being downloaded from a web server (http://... or mms://...) if I try to modify the Position property or the SpeedRatio property I receive the Exception from HRESULT: 0x8898050C. However, until this afternoon, only one video did not behave this way. It worked fine (from the same web server). Then today, as I was browsing this forum and and also debugging, setting a breakpoint on a running video (xxx_MediaFailed event) after about 13 minutes into the video (of around 50 minutes total) the problem went away. Now if I play that video it works fine (FF and Rewind). This leads me to believe that there is a certain point in the buffering or downloading process at which the system can then handle Position modifications or SpeedRatio modifications. I don't know if that is indicative of the video being buffered onto my hard drive or if there is some other explanation.
So the ultimate questions are, "Is there a property that will let me know when it is okay to attempt Position or SpeedRatio modifications, possibly boolean, or a percentage of the buffering process completed so that I can conditionally allow those actions?" and "Can I change the buffering characteristics so that I can start using those actions sooner?".
Thanks,
Yi-Lun L...
All-Star
25052 points
2,747 Posts
08-27-2008 1:08 AM |
Hello, is this WPF or Silverlight? Currently Silverlight doesn't support Fast Forward/Rewind. So it seems that you're using WPF. If so, please ask your question on the WPF forum. Anyway, there's a CanSeek property of MediaElement in Silverlight. But its' not available in WPF. You should always try to seek after the media is opened (when MediaOpened event is fired).
08-27-2008 7:06 AM |
Sorry. I didn't realize the MediaElement was different in Silverlight and WPF. Doesn't that make code less portable? I'm assuming that if the media is playing that the MediaOpened event has fired, but I guess it's bad to assume. I will look into what you said and also consult the WPF forum.
08-30-2008 9:07 AM |
Even though this relates to WPF's MediaElement I thought I would let you know what I found. Apparently, the ability to change these properties depends on having the full file downloaded. I implemented a way of seeing the .DownloadProgress property and when the value reaches 1.0 (100%) then I am able to modify the properties and then gain the FF and REW emulation and can skip to different positions in the media.
HTH,