
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:
Commenti su questo manuale