This project is read-only.

How to play video not after complete download but play while buffering

Topics: Windows 8 Xaml
Feb 21, 2013 at 10:54 AM
Edited Feb 22, 2013 at 11:15 AM
i m using xaml in windows 8 application....

<PlayerFramework:MediaPlayer x:Name="VideoPlayer" Source="{Binding VideoUrl}" Visibility="{Binding VideoVisbility}" PosterSource="{Binding Image}" AutoPlay="False" IsReplayVisible="True" RealTimePlayback="True" IsSignalStrengthVisible="True"/>

where VideoUrl is a http link.

when i tries to play it gets downloaded and then played but i want it to play while buffering. just like it happens in youtube.

i am recieving .mp4 file from server.

But in same scenario when i used to play "big_bunny" video it get buffered and play.
So i am unable to find the issue.. please help.

Whereas these video are buffering and playing successfully in Android application and ios application even on windows 8 phone xaml application just by giving source to it.
Feb 27, 2013 at 6:54 PM
I'm guessing that your server needs to be configured to send the Accept-Ranges: bytes header. Please use fiddler to see if this header is not being supplied on the stream in question.

Also, here's a blog post on setting this up on Azure Blobs in case it is helpful.
Apr 22, 2013 at 8:20 AM
Edited Apr 22, 2013 at 12:09 PM
GET /xxxxxxxxxxxxx/files/xxxxxxxxx/xxxxxxx/10xx/xxxxx/13184373534534/xxxxxxxxxxxxxxxx.mp4 HTTP/1.1
Cache-Control: no-cache
Accept: /
User-Agent: NSPlayer/12.00.9200.16384 WMFSDK/12.00.9200.16384
GetContentFeatures.DLNA.ORG: 1
Proxy-Connection: Keep-Alive

Video gets downloaded and the above data I got in Inspector window of fiddler.

Tim can you tell me what is going wrong.
Apr 22, 2013 at 8:24 PM
Does the server response send back the Accept-Ranges: bytes header? If not, the Windows 8 MediaElement will exhibit the symptoms you describe in your original post.
Apr 23, 2013 at 5:44 AM
Edited Apr 23, 2013 at 5:47 AM

Accept: * / *

this is what is send in accept header and file keeps on getting downloaded as seen using fiddler.
Apr 24, 2013 at 7:49 AM
got it in my link there is no accept-range: byte header

So did we need to configure our server to send those headers
Apr 26, 2013 at 5:08 PM
Yes, I believe that you need to configure your server to respond with this header.