Video Player with Progress Bar RRS feed

  • Question

  • Hi,

    I'm trying to make a video player in Silverlight (2, beta 2), and I'd like it to have a progress bar. My idea was to have a media element (which would play the video) and a DispatcherTimer (and every time the DispatcherTimer ticks, the progress bar would update to reflect the current position of the video). However, this doesn't work; apparently trying to play a video and run a dispatchertimer on the same thread at the same time is not possible (either one works on its own).

    So I tried to put one of them in a different thread, and discovered that I was having cross-thread permission issues (apparently you can't update controls in the UI from threads other than the UI thread).

    This must be a common problem, but everything I can find online seems to indicate that it should just work with them both in the same thread, which it doesn't. Does anyone have ideas for how to get around this?


    Tuesday, July 15, 2008 5:16 PM


All replies