
Message handling from Server
I have actually trivial task. On the server side (Wowza) I do some authentication and in case of error the server returns some message
for example
sendClientOnStatusError(client, "NetStream.Publish.Denied", "The password is invalid");
Here is the documentation for this function
http://www.wowza.com/resources/serverapi/com/wowza/wms/module/ModuleBase.html#sendClientOnStatusError(com.wowza.wms.client.IClient, java.lang.String, java.lang.String) :
Send an error message to the client-side client.onStatus handler
I am trying to handle this message on client side in order to display it to a user. So I use:
jwplayer("videoDiv").onError( function(event){
document.getElementById('status').innerHTML = "ERROR: " + event.message;
});
But the callback is not called.
How can I communicate between server and client sending just plain messages?