mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 18:10:47 -04:00
ptzwawa
This commit is contained in:
@@ -10,6 +10,7 @@ const { isAdmin, isLockdownAdmin, getRole } = require('../roleService');
|
||||
const { isVerified } = require('../verificationService');
|
||||
const turnService = require('../turnService');
|
||||
const roverManager = require('../roverManager');
|
||||
const ptzCameraService = require('../ptzCameraService');
|
||||
const { getRequestIp, getSocketIp, isLocalNetwork } = require('../../helpers/ipResolver');
|
||||
const { logAdminEvent } = require('../adminLogService');
|
||||
|
||||
@@ -26,6 +27,7 @@ const { canAccessStream } = createVideoAuthPolicy({
|
||||
isVerified,
|
||||
turnService,
|
||||
roverManager,
|
||||
ptzCameraService,
|
||||
getSocketIp,
|
||||
isLocalNetwork,
|
||||
});
|
||||
|
||||
@@ -11,6 +11,7 @@ function createVideoAuthPolicy(deps) {
|
||||
isVerified,
|
||||
turnService,
|
||||
roverManager,
|
||||
ptzCameraService,
|
||||
getSocketIp,
|
||||
isLocalNetwork,
|
||||
} = deps;
|
||||
@@ -40,6 +41,10 @@ function createVideoAuthPolicy(deps) {
|
||||
}
|
||||
}
|
||||
|
||||
if (streamInfo.type === 'ptz') {
|
||||
return ptzCameraService.canRequestLiveVideo(socket);
|
||||
}
|
||||
|
||||
if (sourceType === 'roverMic' && action === 'publish') {
|
||||
const roverId = streamInfo.baseId || streamInfo.id;
|
||||
if (!isVerified(socket)) {
|
||||
|
||||
@@ -48,6 +48,10 @@ function extractStreamInfo(path) {
|
||||
return { type: 'room', id: remaining[1] || '' };
|
||||
}
|
||||
|
||||
if (remaining.length === 2 && remaining[0] === 'ptz') {
|
||||
return { type: 'ptz', id: remaining[1] || '' };
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user