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

pull/133/head
winlin 11 years ago
parent cb55f23363
commit 632255f08f

@ -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.

@ -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;

@ -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;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save