Hello,
I have been trying to implement some streaming for my FLV videos using a CDN (content delivery network). However, there is little information on the internet about dynamic streaming in AS2.0
This is how i initiated the object:
obj = new Object();
obj.oldStreamName = null;
obj.streamName = newVidFile700kbps;
obj.start = 0;
//obj.length = -1;
obj.transition = "switch";
currentStream = obj.streamName;
myNetStream.play2(obj);
The idea is to replace the video with a lower or higher quality version based on the user’s bandwidth at the time.
I use this code to switch to the different bitrate FLV files:
obj.oldStreamName = currentStream;
obj.streamName = newVidFile300kbps;
obj.start = myNetStream.time;
prevTime = _root.myNetStream.time;
//obj.length = -1;
obj.transition = "switch";
currentStream = obj.streamName;
myNetStream.play2(obj);
This is supposed to make the new video seamlessly retain the play position of the one it is replacing.
However, when I run it, the videos always start at 0 seconds, ruining the seamless swap that should be happening.
I have been referencing this article about it, which seems to be the only article on the internet about streaming for AS2.0. (not so helpful)
http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_actionscript.html
Any help would be greatly appreciated.