MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Bedienungsanleitung Seite 133

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 172
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 132
130
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
var primaryUri = "rtmp://primary/app";
var backupUri = "rtmp://backup//app";
function createNetConn(uri){
_root.netConn = new NetConnection();
_root.netConn.onStatus = function(info) {
if (info.code == "NetConnection.Connect.Success"){
// Connection is good, create the ProxyStream
createProxyStream();
}
else if (info.code == "NetConnection.Proxy.NotResponding" ||
info.code == "NetConnection.Connect.Closed") {
// The proxy isn't responding to our requests, or the connection was closed,
// so switch to an alternate origin...
var nextUri;
if (uri == primaryUri){
nextUri = backupUri;
}
else {
nextUri = primaryUri;
}
createNetConn(nextUri);
}
};
_root.netConn.connect(uri);
}
function createProxyStream() {
_root.ps = new ProxyStream(_root.netConn);
_root.ps.onStatus = function(info) {
// Handle ProxyStream status notifications
};
_root.ps.proxyFrom("localStream", "remoteStream");
}
createNetConn(primaryUri);
ProxyStream.proxyFrom()
ps.proxyFrom(local, remote)
Proxies a stream from one Adobe Media Server to another over a NetConnection. The stream can be live, recorded, or both.
Availability
Flash Media Server 3.5
Parameters
local A string specifying a local stream name.
remote A string specifying a remote stream name.
ProxyStream.stop()
ps.stop()
Stops proxying a stream.
Seitenansicht 132
1 2 ... 128 129 130 131 132 133 134 135 136 137 138 ... 171 172

Kommentare zu diesen Handbüchern

Keine Kommentare