Hi,
The situation is as follows:
I'm using Windows Media Services 9 to stream my video and I use the latest Silverlight Mediaplayer RadControl from Telerik. At the moment I'm testing it all local host and the streaming server is in the same network, so problems with bandwidth and buffering etc is not the cause. I want to skip my video for one second so I've added a button with the following code behind:
Occurring to the following thread: Forward, Rewind Buttons & Methods, this code should do the trick. As you can see, I first pause the video, and I can see in my textbox (StartTijd) that the time is being raised by one second. Also the video that's being showed in the MediaElement skips a second. Unfortunately, when I press play to continue my video, MediaElement.Position jumps with 4 seconds.
I've tried several solutions and all didn't solved the problem:
1. Replaced "huidigetijd" with MediaPlayer.MediaElement.Position.
2. Removed MediaPlayer.MediaElement.Pause();
3. I've searched the internet but couldn't find anything about this strange 4 second jump.
I've been struggling for hours now with this problem I've encountered, please help me out.
With kind regards,
Michiel
The situation is as follows:
I'm using Windows Media Services 9 to stream my video and I use the latest Silverlight Mediaplayer RadControl from Telerik. At the moment I'm testing it all local host and the streaming server is in the same network, so problems with bandwidth and buffering etc is not the cause. I want to skip my video for one second so I've added a button with the following code behind:
private void StartFragmentRechts_Click(object sender, System.Windows.RoutedEventArgs e) |
{ |
MediaPlayer.MediaElement.Pause(); |
TimeSpan huidigetijd; |
if (TimeSpan.TryParse(StartTijd.Text, out huidigetijd)) |
{ |
StartTijd.Text = huidigetijd.Add(new TimeSpan(0, 0, 0, 1, 0)).ToString(); |
MediaPlayer.MediaElement.Position = huidigetijd.Add(new TimeSpan(0, 0, 0, 1, 0)); |
} |
} |
Occurring to the following thread: Forward, Rewind Buttons & Methods, this code should do the trick. As you can see, I first pause the video, and I can see in my textbox (StartTijd) that the time is being raised by one second. Also the video that's being showed in the MediaElement skips a second. Unfortunately, when I press play to continue my video, MediaElement.Position jumps with 4 seconds.
I've tried several solutions and all didn't solved the problem:
1. Replaced "huidigetijd" with MediaPlayer.MediaElement.Position.
2. Removed MediaPlayer.MediaElement.Pause();
3. I've searched the internet but couldn't find anything about this strange 4 second jump.
I've been struggling for hours now with this problem I've encountered, please help me out.
With kind regards,
Michiel