Thursday, September 13, 2012

Pausing video after configurable time interval

Pausing video after configurable time interval

I have a scenario where I need pause a playing video after a configurable number of seconds. User will only be able to continue after pressing a button below the video.

Once the 'continue' button is pressed, the video should resume from the paused location.

So, basically my main question is how do I pause the video after x seconds and disable play button?

Help much appreciated..

Answers & Comments...

Answer: 1

Hi Nick,

nick a

Once the 'continue' button is pressed, the video should resume from the paused location.

If you want to save the paused position of the media and play from this postion when press Play button again, you can utilize a global variable to achieve the goal. You can find an example I posted in below thread.

http://forums.silverlight.net/p/247509/618869.aspx/1?Re+Does+state+of+the+media+element+gets+maintained+when+I+make+a+round+trip+

Best Regards,



Answer: 2

nick a

nick a

This is the action code.

DispatcherTimer timer = new DispatcherTimer();

             timer.Interval = TimeSpan.FromSeconds(2);

             timer.Tick += (s, ex) =>

             {

                 timer.Stop();

                //Action

             };

             timer.Start()

 

Expression Blend Team already implemented those code so that you should employ those code then plus my code 555++



Answer: 3

TweakupTransition is a simple code(WPF) but similar function.

https://skydrive.live.com/?sc=documents&cid=b692c2cbad70a05c%23%21%2F%3Fcid%3Db692c2cbad70a05c&uc=1&id=B692C2CBAD70A05C%21127

 





No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog