MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Manuale Utente Pagina 132

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 172
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 131
129
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Example
nc = new NetConnection;
nc.onStatus = function(info) {
if (info.code == "NetConnection.Connect.Success"){
// Create a proxy to the remote stream "remoteStream"
// This stream is published locally as "localStream"
ps = new ProxyStream(nc);
ps.onStatus = function(info) {
if (info.code == "ProxyStream.Proxy.Start") {
// The local stream was published.
}
else if (info.code == "ProxyStream.Proxy.Stop") {
// The local stream was stopped.
}
else if (info.code == "ProxyStream.Proxy.BadName") {
// The publish failed because the local name was invalid
// or existed.
}
};
ps.proxyFrom("localStream", "remoteStream");
}
};
nc.connect("rtmp://origin.mydvr.com/dvr");
The following example uses two origin connections, primaryURI and backupURI to demonstrate failover:
Vedere la pagina 131
1 2 ... 127 128 129 130 131 132 133 134 135 136 137 ... 171 172

Commenti su questo manuale

Nessun commento