I am trying to execute a function for every viewer from Wowza and this is my first try at ActionScript so I need a little guidance.
On the server side I have this:
public void myFunction(){
IMediaStream stream = this.appInstance.getStreams().getStream("myStream");
String callback = "testCuePoint";
String data = "this is a test";
stream.sendDirect(callback, data);
}
And this is what I have on the client side:
var nsPlayClientObj:Object = new Object();
nsPlayClientObj.testCuePoint = function(data:String):void
{
trace("cuepoint data: " + data);
};
I took this from this thread and put it in the “function Player()” code block sample player provided in the examples folder. I have a feeling that’s not where it’s supposed to go but again, this is my first time coding in AS so I’m just feeling my way around.
I’ve looked at the “ServerSideModule” within examples but all those examples are making calls that originate from a flash client. I want the call to originate from the server. I did find one thread on here that has exactly what I’m looking for but I didn’t understand his client-side code. ie where does that go in the player code? Is that all there is to it?