int streamId = getCurrentStreamId();
if (name == null || "".equals(name)) {
sendNSFailed((RTMPConnection) streamConn, "The stream name may not be empty.", name, streamId);
return;
}
IStreamSecurityService security = (IStreamSecurityService) ScopeUtils.getScopeService(scope, IStreamSecurityService.class);
if (security != null) {
Set<IStreamPlaybackSecurity> handlers = security.getStreamPlaybackSecurity();
for (IStreamPlaybackSecurity handler: handlers) {
if (!handler.isPlaybackAllowed(scope, name, start, length, flushPlaylist)) {
sendNSFailed((RTMPConnection) streamConn, "You are not allowed to play the stream.", name, streamId);
return;
}