How to play portions of the video in a sequence?

Oct 9, 2012 at 9:47 AM

Hi Everyone

I have a requirement where in I would need to play the video for the timelines marked. I have to play the selected portions of the video (whose timelines are marked earlier). For eg: I may need to start the play from 00:01:15 to 00:01:45 and after that it needs to play from 00:03:10 to 00:04:15 etc.

I see I can only set the startupposition  but I don't find anything that helps in meeting my requirement.

Note: All these are on a single video file only.

Appreciate your help on this.

Coordinator
Oct 10, 2012 at 11:59 PM
Edited Oct 11, 2012 at 12:02 AM

One way to do this: For the very first segment, you can set the StartupPosition property to it's start position. Additionally, you'd create TimelineMarkers for all the segment end positions and add them to the Markers collection. When the marker is reached it will fire the MarkerReached event. Here you can seek to the next segment start position by setting the Position.

CORRECTION: this last paragraph only applies to the Windows 8 version...

Note: The timeline in the control panel will still reflect the true size of the video. If you want to manipulate what the timeline displays to the user, you can create an IInteractiveViewModel implementation and set MediaPlayer.InteractiveViewModel to it. This give you complete control over everything the control panel shows and can do.

 

Oct 15, 2012 at 1:05 PM
Hi Tim
Thanks for the suggestion. It worked fine.
Sent from Windows Mail
From: timgreenfield
Sent: ‎October‎ ‎11‎, ‎2012 ‎5‎:‎30‎ ‎AM
To: keesarisrikanth@gmail.com
Subject: Re: How to play portions of the video in a sequence? [smf:398634]

From: timgreenfield

One way to do this: For the very first segment, you can set the StartupPosition property to it's start position. Additionally, you'd create TimelineMarkers for all the segment end positions and add them to the Markers collection. When the marker is reached it will fire the MarkerReached event. Here you can seek to the next segment start position by setting the Position.

Note: The timeline in the control panel will still reflect the true size of the video. If you want to manipulate what the timeline displays to the user, you can create an IInteractiveViewModel implementation and set MediaPlayer.InteractiveViewModel to it. This give you complete control over everything the control panel shows and can do.