调整通用点播代码封装

This commit is contained in:
648540858
2024-11-28 14:38:20 +08:00
parent 3b24a6c8ca
commit f7ed06e5f5
3 changed files with 27 additions and 29 deletions

View File

@@ -240,21 +240,7 @@ public class CommonChannelController {
result.setResult(WVPResult.fail(code, msg));
}
};
if (channel.getGbDeviceDbId() != null) {
// 国标通道
channelPlayService.playGbDeviceChannel(channel, callback);
} else if (channel.getStreamProxyId() != null) {
// 拉流代理
channelPlayService.playProxy(channel, callback);
} else if (channel.getStreamPushId() != null) {
// 推流
channelPlayService.playPush(channel, null, null, callback);
} else {
// 通道数据异常
log.error("[点播通用通道] 通道数据异常,无法识别通道来源: {}({})", channel.getGbName(), channel.getGbDeviceId());
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
}
channelPlayService.play(channel, null, callback);
return result;
}
}