| | |
| | | } |
| | | // 推流鉴权的处理 |
| | | if (!"rtp".equals(param.getApp())) { |
| | | StreamProxyItem stream = streamProxyService.getStreamProxyByAppAndStream(param.getApp(), param.getStream()); |
| | | if (stream != null) { |
| | | HookResultForOnPublish result = HookResultForOnPublish.SUCCESS(); |
| | | result.setEnable_audio(stream.isEnableAudio()); |
| | | result.setEnable_mp4(stream.isEnableMp4()); |
| | | return result; |
| | | } |
| | | if (userSetting.getPushAuthority()) { |
| | | // 推流鉴权 |
| | | if (param.getParams() == null) { |
| | |
| | | String deviceId = s[0]; |
| | | String channelId = s[1]; |
| | | Device device = redisCatchStorage.getDevice(deviceId); |
| | | if (device == null) { |
| | | if (device == null || !device.isOnLine()) { |
| | | defaultResult.setResult(new HookResult(ErrorCode.ERROR404.getCode(), ErrorCode.ERROR404.getMsg())); |
| | | return defaultResult; |
| | | } |