Chrome does not make additional request for seeking video file -
i try achieve pseudo streaming, have html so:
<video src="getvideo.ashx?id=mp4" controls></video>
after loading page chrome 28.0.1500.72 m sends request (even before clicking play):
get /getvideo.ashx?id=mp4 http/1.1 host: localhost connection: keep-alive accept-encoding: identity;q=1, *;q=0 user-agent: mozilla/5.0 (windows nt 6.2; wow64) applewebkit/537.36 (khtml, gecko) chrome/28.0.1500.72 safari/537.36 accept: */* referer: http://localhost/jwplayertestmp4proper.aspx accept-language: ru-ru,ru;q=0.8,en-us;q=0.6,en;q=0.4 cookie: jwplayer.volume=12 range: bytes=0-
and server responds
http/1.1 206 partial content cache-control: private content-length: 5186931 content-type: video/mp4 content-range: bytes 0-5186930/5186931 accept-ranges: bytes server: microsoft-iis/8.0 x-aspnet-version: 4.0.30319 x-powered-by: asp.net date: mon, 22 jul 2013 08:13:28 gmt
file starts play after clicking play, problem if try seek yet not downloaded part, not send additional request part, waits until file downloaded upon specified position.
when same in firefox 22.0: first request (after page loading):
get http://localhost/getvideo.ashx?id=mp4 http/1.1 host: localhost user-agent: mozilla/5.0 (windows nt 6.2; wow64; rv:22.0) gecko/20100101 firefox/22.0 accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5 accept-language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3 range: bytes=0- referer: http://localhost/jwplayertestmp4proper.aspx connection: keep-alive
first response (it same chrome):
http/1.1 206 partial content cache-control: private content-length: 5186931 content-type: video/mp4 content-range: bytes 0-5186930/5186931 accept-ranges: bytes server: microsoft-iis/8.0 x-aspnet-version: 4.0.30319 x-powered-by: asp.net date: mon, 22 jul 2013 08:28:19 gmt
second request (after seeking yet not downloaded part):
get http://localhost/getvideo.ashx?id=mp4 http/1.1 host: localhost user-agent: mozilla/5.0 (windows nt 6.2; wow64; rv:22.0) gecko/20100101 firefox/22.0 accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5 accept-language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3 range: bytes=2490368- referer: http://localhost/jwplayertestmp4proper.aspx connection: keep-alive
second response:
http/1.1 206 partial content cache-control: private content-length: 2696563 content-type: video/mp4 content-range: bytes 2490368-5186930/5186931 accept-ranges: bytes server: microsoft-iis/8.0 x-aspnet-version: 4.0.30319 x-powered-by: asp.net date: mon, 22 jul 2013 08:35:34 gmt
ie 10 working in same way firefox.
what response header chrome expects able behave in same way - make addtional requests after seeking not-downloaded part?
it turned out response header correct. problem was using video file small length , chrome appears have kind of optimization not sending additional request if difference in time small (less 30 seconds or so).
Comments
Post a Comment