Hi,
I am trying to create a custom media player in Silverlight. I am working on the Progress Bar. I want the progress bar to display the current Download Progress as well as the Current Position of the mediaelement while it is playing.
To do this I have a Progress Bar to display the download progress and a Slider laid over top to display the current position.
I set the value for both as a percentage out of 100.
For example:
ProgressBar.Value = mediaelement.downloadprogress
Slider.Value = (mediaelement.Position.TotalMilliseconds) / (mediaelement.NaturalDuration.TimeSpan.TotalMilliseconds)
The problem is the Slider.Value becomes larger than the ProgressBar.Value. How is this possible? How can I be playing the video at a farther position than what has been downloaded?
Any advice on how to get these to sync up properly?
Thanks.