HTML5,分块视频流 [英] Html5, chuncked video streaming
问题描述
我的html视频调用了多个单独的块请求.似乎不像单流.
My html-video calls multiple separate request for chunks. seems not like single stream.
当我在调试工具中看到这一点时,
When I see that in debugging tools,
如您所见,有3个不同的通话.
As you see, there are 3 different call.
这是请求标头,
Accept:*/*
Accept-Encoding:identity;q=1, *;q=0
Accept-Language:ja-JP,en-US;q=0.8
Connection:keep-alive
Cookie:stg_domain_token=oNijQNByftcYnsLGzFZxRyCesLR-GdWKi6a-uKSJJ9060Yk8pwCiUlcHChyf
Host:stg.myhost.com
Range:bytes=32768-
User-Agent:Mozilla/5.0 (Linux; Android 6.0.1; SC-05G Build/MMB29K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/54.0.2840.68 Mobile Safari/537.36
X-DevTools-Emulate-Network-Conditions-Client-Id:62626f5b-82c9-48b9-97f5-a7a983e1c3bc
这是响应头,
accept-ranges:bytes
Connection:keep-alive
Content-Disposition:filename=49976265106__9BB3FA25-04E4-4AF5-903C-9B12CF622567.MOV
Content-Length:324882
content-range:bytes 32768-357649/357650
Content-Type:video/quicktime
Date:Fri, 04 Nov 2016 06:15:06 GMT
Server:Apache
X-Powered-By:PHP/5.6.17
有人知道我想念什么吗?
anyone know what I am missing?
推荐答案
浏览器一次不会下载整个视频或音频文件.它将它们分块下载并一个接一个地播放.
Browser won't download entire video or audio file at a time. It downloads them in chunks and plays them one after another.
为您的理解,我在这里解释标题.
For your understanding, I'm explaining the headers here.
请求标头
Accept:*/*
:浏览器将接受任何MIME类型作为响应.
Accept:*/*
: Browser will accept any MIME-Types as response.
Range:bytes=32768-
:浏览器已经具有视频部分,直到字节32767,但需要字节32768中的文件.
Range:bytes=32768-
: Browser already has the video part, till byte 32767 but requires file from byte 32768.
响应标题
status : 206
:表示投放的内容是部分内容(不是完整的文件)
status : 206
: It means the served content is partial (not complete file)
accept-ranges:bytes
:服务器仅接受字节范围(通用)
accept-ranges:bytes
: Server accepts byte ranges only (which is universal)
Content-Length:324882
:从请求的字节开始的总内容长度.
Content-Length:324882
: Total content length from requested byte.
content-range:bytes 32768-357649/357650
:此格式的起始字节-最后一个字节/总长度(从0字节到结尾)
content-range:bytes 32768-357649/357650
: it is in this format start byte - last byte / total length (from 0 byte to end)
Content-Type:video/quicktime
:内容类型
这篇关于HTML5,分块视频流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!