none
How to update Media Element when it poision has been changed or i stopped it ? RRS feed

  • General discussion

  • In one window i have track bar in another media element played video.

    1. When i push stop button i execute mediaElement.Stop() method ( i may mistake ).
    So now media element position is 0. And i whant see 0 movie picture.
    But it stopps where it played.

    2. When i push pause i execute mediaElement.Pause() method.
    And then i begin to change track bar, which changes mediaElement.Position property. But picture doesn't change.

    I want to do.
    mediaElement.Stop(); mediaElement.Update() - ?
    mediaElement.Pause(); mediaElement.Position = ....; mediaElement.Update() - ?

    3. When my video is played the position of mediaElement is changed. I want my trackBar change it thumb position too. But i try to find any events when mediaElement changes, and i can't find it.

    I solve this problem using timer in mediaElement window, and when newPoistion!=olddPosition i raise event. Any other solution ?
    • Edited by SmartWhy Tuesday, October 28, 2008 7:38 AM
    • Changed type SmartWhy Wednesday, October 29, 2008 7:31 AM
    • Changed type SmartWhy Wednesday, October 29, 2008 7:31 AM
    Tuesday, October 28, 2008 7:37 AM

All replies

  • I solve problem 1 and 2 setting ScrubbingEnabled property to true.

    "
    Gets or sets a value that indicates whether the MediaElement will update frames for seek operations while paused. This is a dependency property."
    Wednesday, October 29, 2008 7:31 AM