Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageactionscript3
themeRDark
	private function handleStreamStatus(event:NetStatusEvent):void{
		Logger.info("handleStreamStatus: "+event.info.code);
		switch (event.info.code) {
            ...
			case "NetStream.Unpublish.Success":
				publishStream.removeEventListener(NetStatusEvent.NET_STATUS, handleStreamStatus);
				publishStream=null;	
				setPublishStatus("UNPUBLISHED");
				publishBtn.visible = true;
				unpublishBtn.visible = false;
				break;
            ...
		}		
	}
Excerpt

Setting a server application while RTMP stream publishing

While publishing RTMP stream to WCS server, a server application can be set that will be used to backend server interaction. It can be done with parameter in stream URL:

Code Block
languagebash
themeRDark
rtmp://host:1935/live?appKey=key1/streamName

Where

  • host is WCS server;
  • key1 is application key on WCS server;
  • streamName is stream name to publish

By default, if application key parameter is not set, the standard application flashStreamingApp will be used.

Besides, an application can be explicitly specified as stream URL part. To do this, the following parameter in flashphoner.properties file should be set

Code Block
languagebash
themeRDark
rtmp_appkey_source=app

Then application key must be set in stream URL as

Code Block
languagebash
themeRDark
rtmp://host:1935/key1/streamName

In this case, live is also an application name, therefore when stream is published with URL

Code Block
languagebash
themeRDark
rtmp://host:1935/live/streamName

live application must be defined on WCS server.

Known issues

1. When audio only stream is published, and this stream is played in browser via WebRTC, no sound is played.

...