
12
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
• mp4:/ clears all F4V streams associated with the application instance (for example, foo.mp4, foo.f4v, and so on).
• mp4:foo.mp4 clears the foo.mp4 file.
• mp4:foo.mov clears the foo.mov file.
• mp3:/mozart/requiem clears the MP3 file named requiem.mp3 from the application instance’s /mozart
subdirectory.
• mp3:/mozart/* clears all MP3 files from the application instance’s /mozart subdirectory.
• /report clears the report.flv stream file from the application instance directory.
• /presentations/intro clears the recorded intro.flv stream file from the application instance’s /presentations
subdirectory; if
intro is a directory name, no streams are deleted.
• /presentations/* clears all FLV files from the application instance’s /presentations subdirectory. The
/presentation subdirectory is also deleted if no streams are used in this namespace.
• /presentations/report?? clears all FLV files that begin with “report,” followed by any two characters. If there
are directories within the given directory listing, the directories are cleared of any streams that match
report??.
Returns
A boolean value of true if the stream at the specified path was deleted; otherwise, false. If wildcard characters are
used to clear multiple stream files, the method returns
true only if all the streams that match the wildcard pattern were
successfully deleted; otherwise, it returns
false.
Example
The following example clears all recorded streams:
function onApplicationStop(){
application.clearStreams("/");
}
The following example clears all MP3 files from the application instance’s /disco subdirectory:
function onApplicationStop(){
application.clearStreams("mp3:/disco/*");
}
Removing all HDS segments
To remove all the existing HDS segments when the application unloads, you can use the clearOnAppStop tag as
shown below:
<JSEngine>
<ApplicationObject>
<config>
<clearOnAppStop>true</clearOnAppStop></config>
</ApplicationObject>
</JSEngine>
application.clients
application.clients
Read-only; an Array object containing a list of all the clients connected to an application. Each element in the array is
a reference to the Client object; use the
application.clients.length property to determine the number of users
connected to an application.
Komentarze do niniejszej Instrukcji