![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | 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. |
My System Specs![]() |
| | #2 (permalink) |
| | 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. > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Microsoft Beta Client reports appear here? | Vista General | |||
| Looks like PT (from WinSuperSite.com) is wrong again, there is no sign of the Windows Vista Public Beta. | Vista General | |||