Results 1 to 5 of 5

Thread: How to disconnect play streams from publish stream

  1. #1
    Join Date
    Dec 2011
    Posts
    24

    Question How to disconnect play streams from publish stream

    Hi,

    We use this code for disconnecting play streams, but it only works for RTMP clients.

    		IApplicationInstance instance;
    		List playstreams = instance.getPlayStreamsByName(virtual_stream_name);
    		if(playstreams == null) {
    			WMSLoggerFactory.getLogger(null).info("getPlayStreamsByName == NULL");
    			return;
    		}
    		Iterator<IMediaStream> iter_play_streams = playstreams.iterator();
    		while(iter_play_streams.hasNext()) {
    			IMediaStream player_stream = iter_play_streams.next();
    			player_stream.getClient().setShutdownClient(true);
    		}
    How to disconnect HLS clients ?

    Thanks,
    Alex

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

    Default

    Alex,

    Take a look at this example:

    http://www.wowza.com/forums/content....-and-San-Jose)

    httpSession.rejectSession();
    Richard

  3. #3
    Join Date
    Dec 2011
    Posts
    24

    Default

    Thanks Richard,

    How to find all IHTTPStreamerSession -s that are playing certain IMediaStream ?

  4. #4
    Join Date
    Sep 2011
    Posts
    1,934

    Default

    Hi
    looking at your code above its done like this,
    List<IHTTPStreamerSession> MyHTTPClients = instance.getHTTPStreamerSessions();

    Then to get a specific stream you need to use,
    the objects inside "MyHTTPClients" - getStream().getName()

    Jason

  5. #5
    Join Date
    Dec 2011
    Posts
    24

    Default

    Thanks, that worked.

Similar Threads

  1. Getting publish stream from play() function
    By kyanar in forum Server-side Modules and Code Samples Discussion
    Replies: 5
    Last Post: 02-13-2013, 12:29 PM
  2. how to publish and play multiple live streams using a stream manager
    By ppulavarthi in forum Live Streaming and Encoder Discussion
    Replies: 2
    Last Post: 01-31-2013, 01:31 AM
  3. Replies: 1
    Last Post: 07-19-2012, 03:11 PM
  4. Publish and play a live stream from API
    By Garilixo in forum Server Administration Discussion
    Replies: 7
    Last Post: 11-04-2011, 02:15 PM

Posting Permissions

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