Changed the Example module to work with the new RTMPAdapter prototype
This commit is contained in:
parent
0548789dea
commit
ffdd1a336d
@ -20,9 +20,10 @@ package org.bigbluebutton.modules.example
|
||||
{
|
||||
import flash.events.NetStatusEvent;
|
||||
import flash.net.NetConnection;
|
||||
import flash.net.Responder;
|
||||
import flash.net.SharedObject;
|
||||
|
||||
import mx.controls.Alert;
|
||||
import mx.controls.Alert;
|
||||
|
||||
public class ExampleChatProxy
|
||||
{
|
||||
@ -42,7 +43,7 @@ package org.bigbluebutton.modules.example
|
||||
|
||||
extractAttributes(attributes);
|
||||
|
||||
simpleChatSO = SharedObject.getRemote("simpleChatSO", url, false);
|
||||
simpleChatSO = SharedObject.getRemote("simpleChat", url, false);
|
||||
simpleChatSO.addEventListener(NetStatusEvent.NET_STATUS, netStatusEventHandler);
|
||||
simpleChatSO.client = this;
|
||||
simpleChatSO.connect(connection);
|
||||
@ -60,8 +61,23 @@ package org.bigbluebutton.modules.example
|
||||
Alert.show(event.info.status);
|
||||
}
|
||||
|
||||
//public function sendMessage(message:String):void{
|
||||
// simpleChatSO.send("serverCallback", message);
|
||||
//}
|
||||
|
||||
public function sendMessage(message:String):void{
|
||||
simpleChatSO.send("serverCallback", message);
|
||||
connection.call("rtmpadapter.sendData", new Responder(
|
||||
function(result:Object):void{
|
||||
//window.displayNewMessage(result as String);
|
||||
},
|
||||
function(status:Object):void{
|
||||
window.displayNewMessage("Call failed");
|
||||
}),
|
||||
"simpleChat", "testMethod", message)
|
||||
}
|
||||
|
||||
public function testMethod(data:String):void{
|
||||
window.displayNewMessage(data);
|
||||
}
|
||||
|
||||
public function serverCallback(message:String):void{
|
||||
|
Loading…
Reference in New Issue
Block a user