Results 1 to 2 of 2

Thread: Wowza Play method serverside

  1. #1
    Join Date
    Sep 2015

    Lightbulb Wowza Play method serverside

    Hi, sorry my english is so bad, but i'll try to explain my problem.

    So, i should do a node js application who communicate with a wowza (engine 4.2) server to certified client and authorize play stream.

    To communicate i use socket and a thread to parse command from node js.

    client ==> node js
    client ==> wowza server (play stream)
    wowza server ==> node js (call node js to authorize user to play stream)
    node js ==> wowza server (it's ok you can play stream).

    communication beetween node and wowza is ok. But i can't play stream by serverside.
    ERROR server comment - invoke(play): java.lang.reflect.InvocationTargetException|at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)|at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)|at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)|at java.lang.reflect.Method.invoke(Unknown Source)|at com.wowza.wms.module.ModuleFunction.invoke(|
    and now java code

    PLAY from custom module
    public void play(IClient client, RequestFunction function, AMFDataList params) {
    		String id = client.getProperties().getPropertyStr("userID");
    		String token = client.getProperties().getPropertyStr("token");
    		int authorizedToPlay = client.getProperties().getPropertyInt("authorizedToPlay", 0);
    		if(authorizedToPlay == 1){
    			invokePrevious(this, client, function, params);
    			if(authorizedToPlay == -1){
    				client.rejectConnection("not authorized");
    				nodeJSCommunicator.requestPlayStream(id, token, client.getIp());
    nodeJSCommunicator call to play

    public void run() {
    			try {
    				message = in.readLine();
    				JSONObject data = new JSONObject(message);
    				AMFDataList datalist = new AMFDataList();
    			        datalist.add(0, new AMFDataItem("play"));
    			        datalist.add(1, new AMFDataItem("0.0"));
    			        datalist.add(2, new AMFDataItem(""));
    			        datalist.add(3, new AMFDataItem("gauthier.f4v"));
    			        datalist.add(4, new AMFDataItem(0));
    			        datalist.add(5, new AMFDataItem(0));
    					IClient client = this.server.getClient(data.getString("userID"));
    					if(client != null){
    							client.getProperties().setProperty("authorizedToPlay", 1);
    							client.getProperties().setProperty("authorizedToPlay", -1);
, null, datalist);	
    			} catch (IOException e) {
    				running = false;
    this.server refer to custommodule.

    How can i do it?

    Thx for watching

  2. #2


    This is a duplicate



Similar Threads

  1. Play an advertising video before play a VoD on Serverside
    By hungnguyen88 in forum On-Demand Streaming
    Replies: 3
    Last Post: 08-31-2015, 05:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts