I am trying to create a custom media player in Silverlight. I am working on a progress bar. I want the progress bar to display the current current load, as well as the current position MediaElementduring playback.
To do this, I have a progress bar to display the download progress and an overlay slider to display the current position.
I set the value for both as a percentage of 100.
For instance:
ProgressBar.Value = MediaElement.DownloadProgress;
Slider.Value = (MediaElement.Position.TotalMilliseconds) / (MediaElement.NaturalDuration.TimeSpan.TotalMilliseconds);
The problem is that Slider.Value is getting bigger than ProgressBar.Value. How is this possible? How can I play a video in a more distant position than what was uploaded?
Any tips on how to sync them correctly?
Thank.