internet explorer - HTML5 video playback fails in IE (or: Missing range request) -
i apologise asking question asked ten thousand times on before. situation seems different others. in short, video playback via works on firefox , chrome fails in internet explorer, versions, windows versions.
i have web page set according microsoft's html5 suggestions. modal window supplies video:
<!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1" /> </head> <body> <div class="popupwindow"> <video controls autoplay preload="auto" style="width:100%"> <source src="streamvideo.rails?file=$filename" type="video/mp4" /> </video> </div> </body> </html> streamvideo.rails castle monorail c# function acquires video file in cloud server stream , streams range request.
first off, i'm sure it's not usual problems: codec ok, response's content-type right (video/mp4) , ie picking video correctly, @ least initially. in-browser network sniffer shows received small chunk of mp4 file , stopped.
one oddity noticed: ie not framing video request range request whilst chrome/ff are. chrome's headers:
get [my url]?filename=e65b0b0d-0911-4e3f-bc71-7b5d5a65db57.mp4 http/1.1 host: localhost connection: keep-alive accept-encoding: identity;q=1, *;q=0 user-agent: mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/36.0.1985.143 safari/537.36 accept: */* dnt: 1 accept-language: en-us,en;q=0.8 range: bytes=0-6130 ie's headers:
get [same url] http/1.1 user-agent: mozilla/5.0 (windows nt 6.1; wow64; trident/7.0; rv:11.0) gecko accept: */* getcontentfeatures.dlna.org: 1 pragma: getifofileuri.dlna.org accept-language: en-us accept-encoding: gzip, deflate connection: keep-alive dnt: 1 host: localhost i speculate if fix discrepancy, problem go away. so: why ie deciding not make range request? how can force to? if think i'm chasing bogus clue, else can check?
this little late response. thought if searches this, answer them. found when ie requests video content "accept-ranges: bytes" header not present firefox , chrome, on first request set response follows (this asp.net core example):
response.headers.add("accept-ranges", "bytes"); response.contentlength = [length of actual video file]; response.statuscode = (int)httpstatuscode.ok; response.contenttype = [contenttype of requested content]; when response hits browser again evaluate headers , setup video control next request correct headers. when validate existence of range header there , code stream work normal.
hope helps, worked me.
Comments
Post a Comment