4

i use this line to set my media element position

OurElement.Position = TimeSpan.FromSeconds(NowPlayingParameters.Position); 

but it stays 00:00 why can't it jump to the position value

Miroo
  • 795
  • 3
  • 13
  • 35

1 Answers1

5

You should wait for the MediaOpened event before attempting to set the Position

OurElement.MediaOpened += (s, args) => 
{
  OurElement.Position = TimeSpan.FromSeconds(NowPlayingParameters.Position);
}
AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306
  • This approach shows the first frame of the video... :( I'd like skip first frame it and play N seconds later. Is it possible to do? – NoWar Feb 22 '13 at 16:33