tags:

views:

331

answers:

4

The idea is download a video in parts (from different servers) but starting to play before video file is complete. The issue is that VideoDisplay component doesn't read the video file if it is opened for writing and vice-versa: writing is impossible if VideoDisplay plays the video...

A: 

What about having multiple parts of the video, so playing can begin as soon as first part gets downloaded. So the parts have to be concatenated somehow at client side.

(Additionally, if one's connection is insufficient, showing a loading symbol is fine.)

pestaa
A: 

Open the file in Shared mode, if that is possible with Air. Mainstream OS's (Windows, Linux, MacOS) have this functionality built in.

Use two threads:

In thread 1 (the downloader thread) open the file in Shared mode to allow reading from other threads and processes.

In thread 2 (the player thread) open the file in Shared mode to allow reading and writing from other threads and processes.

Be sure to buffer the beginning of the file so your player will always have something to play and won't choke while playing an incomplete file.

CLaRGe
+1  A: 

I know I may sound totally off-topic, but you should make sure you've properly considered video streaming thru Flash Media Server, Wowza or Red5 before you put that much effort in downloading a file in chunks. Just a thought..

evilpenguin
+1  A: 

Waiting for this became true.

Cotton