Seeking during playback of web-hosted Mp4

Topics: Windows 8 Xaml
Aug 26, 2012 at 4:46 PM

I noticed when setting the source of the xaml player to a web-hosted Mp4 that the video plays back fine but seeking to a new playback location does not work.  This worked fine in the SMFPlayer release for Windows Phone 7.  Am I missing something?

Aug 31, 2012 at 1:28 PM

I have the same problem! Any suggestion? 

Sep 2, 2012 at 5:46 PM
Edited Sep 2, 2012 at 11:22 PM


I have made some progress on this issue:

1. Follow the instructions on adding smooth streaming support here:


If setting the player source directly in xaml do:

<mmppf:MediaPlayer Source="">
        <adaptive:AdaptivePlugin />

If setting the player source in code behind, create an instance of the mediaplayer in xaml and set AutoLoadPlugins to False and add the Adaptive plugin to the MediaPlayer.Plugins collection:   



xmlns:mmppf ="using:Microsoft.PlayerFramework"

 xmlns:adaptive ="using:Microsoft.PlayerFramework.Adaptive"     

<mmppf:MediaPlayer x:Name="VideoPlayer" AutoLoadPlugins="False" > 

<mmppf:MediaPlayer.Plugins >

 <adaptive:AdaptivePlugin />

 </mmppf:MediaPlayer.Plugins > 

</mmppf:MediaPlayer >

When updating the player in code behind, I.e. setting the source in code.

Be sure to set the following:

//This is a dirty hack, to force the plugin to load - it will always be @ index 0 if autoloadplugins is set to false and trick it to enable progressive streaming by giving it a valid link to a streamable video I.E. Buck Bunny, don't worry we aren't playing Buck Bunny we are just tricking the player

string t = ""


DispatcherHelper.InvokeAsync(() => VideoPlayer.Source = new Uri(t, UriKind .Absolute));

DispatcherHelper.InvokeAsync(() => VideoPlayer.Plugins[0].Load());

//ENABLE SEEK and anything else you are interested in

DispatcherHelper.InvokeAsync(() => VideoPlayer.IsSeekEnabled = true );

DispatcherHelper.InvokeAsync(() => VideoPlayer.IsScrubbingEnabled = true );

DispatcherHelper.InvokeAsync(() => VideoPlayer.IsSkipAheadEnabled = true );


//Set mp4 source

DispatcherHelper.InvokeAsync(() => VideoPlayer.Source = new Uri(sdUrl, UriKind .Absolute));

//Play video

DispatcherHelper.InvokeAsync(() => VideoPlayer.Play());




Sep 3, 2012 at 7:31 AM


Thanks for your reply!

Unfortunately the workaround you suggested seems not to working for me. Seeking doesn't work and the progress bar seems freezed...

I hope this bug will fixed in the next player release!



Sep 3, 2012 at 10:37 AM

Hi Paul,

I found a solution to my problem.

The MediaPlayer control has the AutoPlay property set true by default.

Everything works fine just by setting the Source with mp4 Uri, without making VideoPlayer.Play():


//Set mp4 source

DispatcherHelper.InvokeAsync(() => VideoPlayer.Source = new Uri(sdUrl, UriKind .Absolute));

//Play video

//DispatcherHelper.InvokeAsync(() => VideoPlayer.Play());


I don't need to set any of the IsSeekEnabled, IsScrubbingEnabled and IsSkipAheadEnabled property.