MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Uživatelský manuál Strana 155

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 172
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 154
152
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Availability
Flash Communication Server 1
Returns
A boolean value of true if the call succeeds; otherwise, false.
Example
The following example deletes a recorded stream called playlist.flv. Before the stream is deleted, the example defines
an
onStatus() handler that uses two information object error codes, NetStream.Clear.Success and
NetStream.Clear.Failed, to send status messages to the application log file and the Live Log panel in the
Administration Console.
s = Stream.get("playlist");
if (s){
s.onStatus = function(info){
if(info.code == "NetStream.Clear.Success"){
trace("Stream cleared successfully.");
}
if(info.code == "NetStream.Clear.Failed"){
trace("Failed to clear stream.");
}
};
s.clear();
}
Stream.destroy()
Stream.destroy()
Unlinks and cleans up an instance of the Stream class. When a call to Stream.destroy() destroys a stream, the server
stops any NetStream playing the stream and logs the code 440 in the Access log. Publishers are disconnected and
recordings are stopped.
Instances of the Stream class are considered live streams. These streams are used as proxy streams, for server-to-sever
streaming, direct client playback, and recordings. It can be difficult to determine whether you’ve properly released a
live stream that has finished playing. Call
Stream.destroy() to unlink and clean up a stream resource.
Availability
Flash Meda Server 3.5.4
Returns
A boolean value of true if the call succeeds.
A boolean value of false if the stream is not found. This case occurs only if the Stream reference has already been
destroyed or if an error has occurred.
Example
The following example destroys a stream called streamA:
// Get a stream.
streamA = Stream.get("clientStream1");
// Destroy the stream.
Stream.destroy(streamA);
Zobrazit stránku 154
1 2 ... 150 151 152 153 154 155 156 157 158 159 160 ... 171 172

Komentáře k této Příručce

Žádné komentáře