SteamStream!WEB-INF!src!steamStream!SsPublishSecurity!!java

From Red5Wiki

Jump to: navigation, search
/*
 * SteamStream - Red5 stream transcoding application
 * Copyright (c) 2009 by Jeremy Morton - All rights reserved.
 * 
 * This application is free software; you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free Software
 * Foundation; either version 2.1 of the License, or (at your option) any later version.
 * Text of this license version 2.1 can be found at the following web address:
 * http://www.gnu.org/licenses/lgpl-2.1.txt
 */
package steamStream;
 
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.api.IScope;
import org.red5.server.api.stream.IStreamPublishSecurity;
import org.slf4j.Logger;
 
public class SsPublishSecurity implements IStreamPublishSecurity {
	// SteamStream publish security checker class
	private static Logger log = Red5LoggerFactory.getLogger(Application.class, "steamStream");
 
	@Override
	public boolean isPublishAllowed(IScope scope, String name, String mode) {
		log.info("SsPublishSecurity isPublishAllowed() called.");
 
		// Always DENY publishing!  Our app should be the only thing that can publish
		// to streams for our applciation, Flash clients should never do so.
		return false;
	}
}
Personal tools