macromedia flash flashcom:
All,
I have an application where a user records a temp cam video. This temp video
is stored on FMS. The user can crop the beginning and end times to save as the
final video.
The user passes the times through the nc.call method to FMS where the server
Stream gets the "final" flv (just the stream name), starts to record on the
"final" flv, and then plays the temp flv with the start and end times passed as
variables.
Now, the problem. If variables are passed, no cropping is accomplished. If I
hard-code the times, cropping is accomplished. How strange...Anyway, any
suggestion is appreciated.
Thanks,
Shack
//Client code
//__userID is varibale passed from logon (i.e. 123)
//__startTime is variable inputed to TextInput
//__endTime is variable inputted to TextInput
__nc.call(""submitVideo", null, __userID, _startTime, _endTime)
//Server side
Client.prototype.submitVideo = function(p_userID, p_startTime, p_endTime)
{
var userID = p_userID;
var start = p_startTime;
var end = p_endTime;
myStream = Stream.get(userID);//Creates the "final" flv stream for recording
myStream.onStatus = function(info){
switch (info.code) {
case "NetStream.Record.Stop" :
trace("Stream Record Stopped")
myStream.flush();
application.clientID.call("RecordVideo/onSubmitVideo",null);
break;
case "NetStream.Record.Start" :
trace("Stream Start Record")
//myStream.send("RecordVideo/onSubmitVideo",null);
break;
case "NetStream.Record.Failed" :
trace("Stream Record Failed")
//myStream.send("RecordVideo/onSubmitVideo",null);
break;
case "NetStream.Play.Start" :
trace("Stream Play Start")
//myStream.send("RecordVideo/onSubmitVideo",null);
break;
case "NetStream.Play.Stop" :
trace("Stream Play Stopped");
myStream.record(false);
//myStream.send("RecordVideo/onSubmitVideo",null);
break;
case "NetStream.Play.Failed" :
trace("Stream Play Failed")
//myStream.send("RecordVideo/onSubmitVideo",null);
break;
}
}
if(myStream){
trace("User ID :" + userID + "\nStart Time :" + start + "\nEnd Time :"+ end)
myStream.record();//Records the userID stream name to be stored as "final"
myStream.play("temp_" + userID, start, end); //Hard-coding values here crops
video
}
}