Skip to main content
Participant
June 23, 2006
Question

Stream class problem

  • June 23, 2006
  • 1 reply
  • 189 views
I am new to Flash, Flash Media Server and so on, and I just don't understand some things.
I need to create an application that will be broadcasting some videos as if they are from web cams.
I need some way to syncronize all opened streams. What I am trying:
fms/application/video_broadcast/main.asc:
===
load( "components.asc" );
application.onAppStart = function() {
application.streampos = 0;
setInterval(function() { application.streampos = (application.streampos + 10) % 10000; }, 10);
}

application.onConnect = function( newClient, username, password ) {
trace( application.name + ":onConnect");
application.acceptConnection(newClient);
var gstream = Stream.get("lost");
gstream.onStatus = function(info) {
trace(application.name + ".gstream.onStatus: " + info.code + "; level = " + info.level);
}
gstream.play("lost",application.streampos,-1,newClient);
}
===
But FMS says: Sending error message: /opt/macromedia/fms/applications/video_broadcast/main.asc: line 11: TypeError: gstream has no properties -

I have /opt/macromedia/fms/applications/video_broadcast/streams/_definst_/lost.flv in place, I can see it without main.asc (application: "rtmp://192.168.2.3/video_broadcast" and stream name: "lost") in flash player.

Give me a clue please what to look for.
    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    Participant
    June 23, 2006
    Ok, I did that using call back to client. I found my errors with this code. I found no convenient way to control stream from server to client.