![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | MediaTimeline reports wrong timeline in Beta 2. Hi All, I try to display playback time for video file using MediaTimeLine, but in Beta 2 when CurrentTimeInvalidated occured, the CurrentTime for mediaClock always will be zero(00:00), is this a Beta 2 bug or the way I use MediaTimeLine is wrong? The following code shows how I use MediaTImeLine: mediaTimeLine = new MediaTimeline(new Uri(filePath, UriKind.RelativeOrAbsolute)); mediaClock = this.mediaTimeLine.CreateClock(); mediaClock.CurrentTimeInvalidated += new EventHandler(ClipCurrentTimeInvalidated); and the following code shows how I handle CurrentTimeInvalidated: void ClipCurrentTimeInvalidated(object sender, EventArgs e) { string ct = this.mediaClock.CurrentTime.ToString(); // Display current time. } and the string "ct" always is 00:00. Does any one know what's going on? Any comments are appreciated, thanks! Horus. |
| | #2 (permalink) |
| Guest | Re: MediaTimeline reports wrong timeline in Beta 2. You need to assign a MediaClock to either a MediaElement or a MediaPlayer's Clock property in order to play media. It doesn't look like you are doing that from the snippet below. Thanks a lot, Ed Maia WPF PM "Horus Liu" <Horus Liu@discussions.microsoft.com> wrote in message news:FA02740C-6F29-40AF-AB79-0EF40E817C9C@microsoft.com... > Hi All, > > I try to display playback time for video file using MediaTimeLine, but in > Beta 2 when > CurrentTimeInvalidated occured, the CurrentTime for mediaClock always will > be zero(00:00), is this a Beta 2 bug or the way I use MediaTimeLine is > wrong? > The following code shows how I use MediaTImeLine: > > mediaTimeLine = new MediaTimeline(new Uri(filePath, > UriKind.RelativeOrAbsolute)); > mediaClock = this.mediaTimeLine.CreateClock(); > mediaClock.CurrentTimeInvalidated += new > EventHandler(ClipCurrentTimeInvalidated); > > and the following code shows how I handle CurrentTimeInvalidated: > > void ClipCurrentTimeInvalidated(object sender, EventArgs e) > { > string ct = this.mediaClock.CurrentTime.ToString(); > > // Display current time. > } > > and the string "ct" always is 00:00. Does any one know what's going on? > Any comments are appreciated, thanks! > > Horus. > |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MediaTimeline and Binding | ShayEr | Avalon | 0 | 04-13-2008 04:37 AM |
| Microsoft Beta Client reports appear here? | Peter | Vista General | 15 | 08-30-2006 02:25 PM |
| Looks like PT (from WinSuperSite.com) is wrong again, there is no sign of the Windows Vista Public Beta. | Kevin John Panzke | Vista General | 3 | 05-28-2006 05:26 PM |
| MediaTimeline.VolumeRatio | Jack | Avalon | 0 | 01-10-2006 03:52 PM |
| re: MediaTimeline.VolumeRatio | robertwl@nospam.microsoft.com | Avalon | 0 | 01-10-2006 03:52 PM |