Flash NetStream request headers

For the past few weeks I’ve been experimenting with different ways of serving up flv’s through different servers (ie…. nginx with installed streaming module). However, we wanted to see how S3 would deal with our need for streaming video. S3 does not support the ability to change a get param into a request header for doing byte offsets. Why is this important?… typically, flvs served up by youtube and other services allow requests to pass in the start point of the stream. This allows a user to fast-forward past the download buffer to any section of a video. The servers are returning pieces of the video file.
I always wondered why this was such a big deal requiring specific modules to be compiled into nginx until I started playing around with http headers directly. So….. here’s the deal. S3 (a service of amazon), allows requesting byte offsets through HTTP Headers. This is great, but alas…. Adobe has let me down. HTTP Headers cannot be implemented through the NetStream Class even though the documentation says otherwise. The HTTP Headers supported by the netstream class are proprietary and only work with Flash Communication Server. This is completely ridiculous.
This also manifests in a couple other ways. You may have noticed that NetStream documentation shows an event attached to videos: NetStream.Play.Complete . I expected this event to be called when the video finished playing…. but nothing happened. After a little digging, it turns out that NetStream.Play.Complete is only available if you’re serving up videos from Flash Communication Server.
Flash video is one of the most frustrating things to deal with because of their closed source pos http request that’s clearly broken. Anywho… I feel like this is a pretty serious issue that needs to be fixed. Why can we use HTTP headers to request data, but not to request a stream? It just doesn’t make any sense.

Leave a Comment

You must be logged in to post a comment.