MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 109

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 108
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
106
A server-side stream cannot subscribe to itself. For example, the following code is invalid:
// Client-side code
var ns = new NetStream
ns.publish("TestStream");
// Server-side code
st = Stream.get("TestStream");
st.play("TestStream");
Stream.record()
myStream.record(flag)
Records all the data passing through a Stream object and creates an FLV file of the recorded stream.
Note: The
Stream.record() method saves all streams as FLV files, even if the stream contains FLV, MP3, and MP4
content. H.264 data and AAC data is not copied to a recorded FLV file.
When you record a stream, the server creates an FLV file and stores it in the streams subdirectory of the application
folder. The server creates the streams directory and subdirectories for each application instance name. If a stream
isnt associated with an application instance, it is stored in a subdirectory called _definst_ (default instance).
For example, a stream from the default lecture application instance would be stored here: applica-
tions\lectures\streams\_definst_. A stream from the monday lectures application instance would be stored here:
applications\lectures\streams\monday.
Note: The server creates these directories automatically; you don’t have to create one for each instance name.
Availability
Flash Communication Server 1
Parameters
flag One of the these values: "record", "append", or false. If the value is "record", the data file is overwritten if
it exists. If the value is "
append", the incoming data is appended to the end of the existing file. If the value is false,
any previous recording stops. By default, the value is "
record".
Returns
A boolean value of
true if the recording succeeds; otherwise, false.
Example
The following example opens a stream
s and, when it is open, plays smith and records it. Because no value is passed
to the
record() method, the default value, record, is passed.
// Start recording.
s = Stream.get("SurfVideos");
if (s){
s.play("smith");
s.record();
}
// Stop recording.
s = Stream.get("SurfVideos");
if (s){
s.record(false);
}
Vedere la pagina 108
1 2 ... 104 105 106 107 108 109 110 111 112 113 114 ... 154 155

Commenti su questo manuale

Nessun commento