MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Bedienungsanleitung Seite 71

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 80
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 70
Server-Side Communication ActionScript 71
If the flag is set to true, some compression is invoked on the server. Using the previous example,
if the flag is set to
true, the server creates a keyframe—based on the preexisting keyframe at time
11—for each keyframe from 11 through 15. Even though a keyframe does not exist at the seek
time, the server generates a keyframe, which involves some processing time on the server.
Example
This example illustrates how streams can be chained between servers:
application.myRemoteConn = new NetConnection();
application.myRemoteConn.onStatus = function(info){
trace("Connection to remote server status " + info.code + "\n");
// tell all the clients
for (var i = 0; i < application.clients.length; i++){
application.clients[i].call("onServerStatus", null,
info.code, info.description);
}
};
// Use the NetConnection object to connect to a remote server
application.myRemoteConn.connect(rtmp://movie.com/movieApp);
// Setup the server stream
application.myStream = Stream.get("foo");
if (application.myStream){
application.myStream.play("Movie1", 0, -1, true, application.myRemoteConn);
}
The following example shows Stream.play used as a hub to switch between live streams and
recorded streams:
// Set up the server stream
application.myStream = Stream.get("foo");
if (application.myStream){
// this server stream will play "Live1",
// "Record1", and "Live2" for 5 seconds each
application.myStream.play("Live1", -1, 5);
application.myStream.play("Record1", 0, 5, false);
application.myStream.play("Live2", -1, 5, false);
}
The following example combines different streams into a recorded stream:
// Set up the server stream
application.myStream = Stream.get("foo");
if (application.myStream){
// Like the previous example, this server stream
// will play "Live1", "Record1", and "Live2"
// for 5 seconds each. But this time,
// all the data will be recorded to a recorded stream "foo".
application.myStream.record();
application.myStream.play("Live1", -1, 5);
application.myStream.play("Record1", 0, 5, false);
application.myStream.play("Live2", -1, 5, false);
}
The following example uses Stream.play to stop playing the stream foo:
application.myStream.play(false);
Seitenansicht 70
1 2 ... 66 67 68 69 70 71 72 73 74 75 76 ... 79 80

Kommentare zu diesen Handbüchern

Keine Kommentare