I want my OSMF player can issue HTTP request with range-request field, but I have no idea yet how to do this work. It seems that when creat the MediaElement by ResourceURL, the HTTP request message is issued, with no more HTTP header field, such as byte-range, can be extended. Does any guys have any suggestions how to use byte-range in OSMF? 3x
Unfortunately, the Flash Player doesn't support byte range requests. (AIR does, however.)
If your goal is to be able to retrieve the bytes of the video as and when the user seeks to that point, you might want to look into our HTTP streaming support (see the v0.95 release notes for details).
I wonder if OSMF team will consider byte-range supporting as one of feature in OSMF in the future. I think as an important feature in HTTP, byte-range is also very useful for media delivery over HTTP. It's a pity that OSMF can't support byte-range request.
Thank you, Brian. Do you have any idea if I want add this feature by myself in OSMF? Is it possible?
You can't use HTTP byte range with e.g. flash.net.URLStream, but you can with as3httpclient (http://github.com/gabriel/as3httpclient)
This is what flowplayer does to implement seeking using byte-range, this also requires Flash 10.1 because you need the new flash.net.NetStream.appendBytes() support.
So I think you could write an org.osmf.net.NetLoader subclass that creates a NetStream that uses appendBytes() and as3httpclient to do byte-range seeking.
flowplayers ByteRangeNetStream is MIT licensed so it could probably be used as a base.
as3httpclient uses flash.net.Socket so you probably need a socket policy file server:
Hmm, so for MP4 flowplayer doesn't seem to properly build a byte offset to time table. I think this could be done now in Flash 10.1 using the new NetStream onSeekPoint event. It should allow you to build a table mapping times to byte offsets (i.e. implement org.flowplayer.pseudostreaming. H264SeekDataStore.extractKeyFrameFilePositions() in the flowplayer implementation)