Dynamic Video shifting
I'm creating a custom video player where the user can select to play the same video at different speeds (100%, 75%, and 50%). We have rendered 3 different MP4 files, one for each speed, and then there is a mechanism in the video player to load each video as the user demands it. It works fine so far, except that when a new video loads, it begins to play from the beginning, not at the point where the previous video left off (which is crucial).
I thought it would be as simple as using either ns.play("videoname", videotime) or using a ns.seek(videotime), but in ether case, the new video still will only play from the beginning.
Here is the code, which includes some calculation for adjust the time depending on the shift from 100%, 75%, and 50%.
function switchSpeedVideo() {
var currentTime:Number = ns.time;
output.text = currentTime.toString(); // outputs correctly
var adjustedTime:Number = (ns.time) * speedFactor;
output.text = adjustedTime.toString(); // outputs correctly
ns.play(currentVideoURL, adjustedTime);
ns.seek(adjustedTime);
videoSwitch = false;
}
I've also tried using just, without seek:
ns.play(currentVideoURL, adjustedTime);and I've tried both this way:
ns.play(currentVideoURL);
ns.seek(adjustedTime)
What is missing here? Currently, I am using HTTP connection ("HTTP Pseudo Streaming" with Wowza on SimpleCDN). Does this require RTMP?
