Results 1 to 3 of 3

Thread: Module remove viewers when ban channel

  1. #1

    Post Module remove viewers when ban channel

    Hi, I need a module that remove the viewers of a channel when is banned.

    Anyone know where I can get it? or How to be done?

    Regards

  2. #2
    Join Date
    Sep 2011
    Posts
    1,931

    Default

    Hi
    You can edit this code to disconnect by IP address,
    http://www.wowza.com/forums/content....mit-to-IP-list

    Or you can have someone build a custom module for you.

    If you require the module to be built for you, you can request the list of independent consultants by email.
    Send your request to support@wowza.com.

    Jason

  3. #3
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Something like this maybe:
    package com.wowza.wms.example.module;
    
    import com.wowza.wms.amf.*;
    import com.wowza.wms.application.*;
    import com.wowza.wms.client.*;
    import com.wowza.wms.module.*;
    import com.wowza.wms.request.*;
    import com.wowza.wms.stream.*;
    import java.util.*;
    
    public class ModuleStreamListExample extends ModuleBase {
    
    	public void shutDownSubscribers(IClient client, RequestFunction function, AMFDataList params)
        {
        	String streamName = params.getString(PARAM1);
     		IApplicationInstance applicationInstance = client.getAppInstance();
        	List<IMediaStream> streamList = applicationInstance.getPlayStreamsByName(streamName);
        	
        	AMFDataObj obj = new AMFDataObj();
        	
        	Iterator<IMediaStream> iter = streamList.iterator();
    		while (iter.hasNext())
    		{
    			IMediaStream stream = iter.next();
    			stream.getClient().setShutdownClient(true);
    		}		
         }
    }
    Call in Flash RTMP client like this:
    netconnection.call("shutDownSubscribers", null, "myStream");

Similar Threads

  1. Module Limit Stream Viewers seems not working for cupertino connection
    By steveitl in forum Server-side Modules and Code Samples Discussion
    Replies: 3
    Last Post: 08-02-2013, 06:51 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
  •