After a lot of experimenting I found the easiest way to pass arguments from the JW Player to Wowza. Just add them as a semicolon separated list to the streamer URL. I needed to have access to the arguments in the onConnect function, because I was using a modified version of this module: http://www.wowza.com/forums/showthre...0015#post10015.
When using JW Player the 'params' does not work in the onConnect function, because it is sparsely filled with:
[0] connect
[1] 1.0
[2] an Obj[], containing many things except for the 'file'
So I had to look for other ways to pass the connectionArgs. I added a querystring to (a) the file, (b) the player.swf and (c) the streamer URL. The streamer proved to be the easiest to parse. My streamer URL is now something like:
streamer: 'rtmps://[domain-name]/vod?database;uid;remote_addr;60'
In the onConnect function I added a few lines to extract the passed arguments:
Mission accomplished. I can replace Flowplayer now with the latest JW Player and overcome the problems Firefox 13 has with Flowplayer and the rtmps protocol.Code:/* explode the client query string */ String clientQuery = client.getQueryStr(); String clientArgs[] = clientQuery.split(";"); if (clientArgs.length > 3) { dataBase = clientArgs[0]; userName = clientArgs[1]; IPaddress = clientArgs[2]; idleTime = Integer.parseInt(clientArgs[3]); }


Reply With Quote