New Silverlight Video Tutorial: How to Create Fast Forward for the MediaElement
Hello All!
As you probably already know there is no “built-in” way to accomplish Fast Forward with the Silverlight MediaElement. So, in this 24 minute video I show you how to:
1. Create a new Silverlight application;
2. Add a MediaElement, a Fast Forward Button and a TextBlock for the video’s position information;
3. Create a PlayState Enum and a DispatcherTimer
4. Then on click of the button I show you how to a. Make the video Fast Forward at 1x speed and b. click it again for 2x speed.
If you are doing video this is a must for any self-respecting video player!
Enjoy!
Video: http://tinyurl.com/3933h8t
Demo (see the Fast Forward button in action here): http://tinyurl.com/32kfu8q
Download my Source Code: http://tinyurl.com/265n5he
(My Source code is not downloading well for me and a few others, if that is the case Michael Washington, MVP has hosted the source on his servers: download here: http://tinyurl.com/2dwgsnm) Thank you Michael
Wow this is great! Rewind? Can I get it in time for my presentation at the Los Angles Silverlight User’s group?
Easy as pie! Instead of this:
double AddTime = CurPos + _InrementalValue;
do this:
double AddTime = CurPos – _InrementalValue;
Rewind, DONE!
I put up a new version just for you with Rewind and Forward. The zip has been updated with the Rewind version as well. http://windowspresentationfoundation.com/Tutorials/MediaElementFastForward/Demo/
Hope this helps Michael. Victor
Wow! this is what I was exactly looking for!!!!!!!!!!! thank you very much. You’re a lifesaver
btw,
in the source code sample,
I believe
double CurPos = MyPlayer.Position.Seconds; should be changed to double CurPos = MyPlayer.Position.TotalSeconds; (for the videos longer than 1 minutes)