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

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 102
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
100
Parameter
name A string indicating the name of a recorded stream, such as “myVideo. The name can be passed in either of
the following forms: “myVideo or “flv:myVideo.
Returns
An Object containing the metadata as properties.
Example
The following example lists the properties and values for the metadata for the recorded stream
myVideo.flv:
var infoObject = Stream.getOnMetaData("myVideo");
trace("Metadata for myVideo.flv:");
for( i in infoObject ){
trace( i + " = " + infoObject[i] );
}
Stream.length()
Stream.length(name[, virtualKey])
Static; returns the length of a recorded file in seconds. If the requested file is not found, the return value is 0.
Availability
Flash Communication Server 1
Parameters
name A string indicating the name of a recorded stream. To get the length of an MP3 file, precede the name of the
file with
mp3: (for example, "mp3:beethoven").
virtualKey A string indicating a key value. Starting with Flash Media Server 2, stream names are not always
unique; you can create multiple streams with the same name, place them in different physical directories, and use
the
VirtualDirectory section and VirtualKeys section of the Vhost.xml file to direct clients to the appropriate
stream. Because the
Stream.length() method is not associated with a client, but connects to a stream on the server,
you may need to specify a virtual key to identify the correct stream. For more information about keys, see
Client.virtualKey. This parameter is optional.
Returns
A number.
Example
The following example gets the length of the recorded stream file
myVideo and assigns it to the variable streamLen:
function onProcessCmd(cmd){
var streamLen = Stream.length("myVideo");
trace("Length: " + streamLen + "\n");
}
The following example gets the length of the MP3 file beethoven.mp3 and assigns it to the variable streamLen:
function onProcessCmd(cmd){
var streamLen = Stream.length("mp3:beethoven");
trace("Length: " + streamLen + "\n");
}
The following example gets the length of the MP4 file beethoven.mp4 and assigns it to the variable streamLen:
Vedere la pagina 102
1 2 ... 98 99 100 101 102 103 104 105 106 107 108 ... 154 155

Commenti su questo manuale

Nessun commento