1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-12 19:31:53 +00:00

update the signature, when connect to server, parse the response.

This commit is contained in:
winlin 2013-12-21 21:13:55 +08:00
parent cb55f23363
commit 632255f08f
6 changed files with 1184 additions and 1158 deletions

View file

@ -90,7 +90,7 @@ function srs_get_player_width() { return srs_get_player_modal() - 30; }
function srs_get_player_height() { return srs_get_player_width() * 9 / 19; }
// to query the swf anti cache.
function srs_get_version_code() { return "1.0"; }
function srs_get_version_code() { return "1.1"; }
/**
* initialize the page.

View file

@ -293,6 +293,18 @@ package
this.media_conn.addEventListener(NetStatusEvent.NET_STATUS, function(evt:NetStatusEvent):void {
trace ("NetConnection: code=" + evt.info.code);
if (evt.info.hasOwnProperty("data") && evt.info.data) {
// for context menu
var customItems:Array = [new ContextMenuItem("SrsPlayer")];
if (evt.info.data.hasOwnProperty("srs_server")) {
customItems.push(new ContextMenuItem("Server: " + evt.info.data.srs_server));
}
if (evt.info.data.hasOwnProperty("srs_contributor")) {
customItems.push(new ContextMenuItem("Contributor: " + evt.info.data.srs_contributor));
}
contextMenu.customItems = customItems;
}
// TODO: FIXME: failed event.
if (evt.info.code != "NetConnection.Connect.Success") {
return;

View file

@ -14,6 +14,7 @@ package
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
import flash.utils.setTimeout;
public class srs_publisher extends Sprite
@ -159,6 +160,18 @@ package
this.media_conn.addEventListener(NetStatusEvent.NET_STATUS, function(evt:NetStatusEvent):void {
trace ("NetConnection: code=" + evt.info.code);
if (evt.info.hasOwnProperty("data") && evt.info.data) {
// for context menu
var customItems:Array = [new ContextMenuItem("SrsPlayer")];
if (evt.info.data.hasOwnProperty("srs_server")) {
customItems.push(new ContextMenuItem("Server: " + evt.info.data.srs_server));
}
if (evt.info.data.hasOwnProperty("srs_contributor")) {
customItems.push(new ContextMenuItem("Contributor: " + evt.info.data.srs_contributor));
}
contextMenu.customItems = customItems;
}
// TODO: FIXME: failed event.
if (evt.info.code != "NetConnection.Connect.Success") {
return;

2315
trunk/src/core/srs_core_rtmp.cpp Normal file → Executable file

File diff suppressed because it is too large Load diff