WPF: Implementing a MediaPlayer Audio / Video Seeker

后端 未结 4 1015
醉话见心
醉话见心 2021-01-01 06:15

I am currently working on an MP3 player (in a WPF application) with a WPF MediaPlayer and basically, I want to implement a Song Seeker which moves along with th

4条回答
  •  一个人的身影
    2021-01-01 06:36

    Never played with media player but assuming you know the length of song could you not setup a timer that ticks every second while the song is playing. Therefore for every tick just increment the seeker in relation to how long the song is in total.

    Song is 100 seconds long. Therefore every second/tick is worth 1 percent of total progress.

    You'd have to stop the timer when pausing song etc...

提交回复
热议问题