feat(backend): add SIMPLE_STREAMING WebRTC control-path streaming
This commit is contained in:
@@ -768,8 +768,12 @@ registry.registerPath({
|
||||
requesterDeviceId: z.string().uuid(),
|
||||
status: z.string(),
|
||||
reason: z.string(),
|
||||
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
||||
startedAt: z.string().datetime().nullable().optional(),
|
||||
endedAt: z.string().datetime().nullable().optional(),
|
||||
createdAt: z.string().datetime().optional(),
|
||||
updatedAt: z.string().datetime().optional(),
|
||||
}),
|
||||
command: DeviceCommandSchema,
|
||||
}),
|
||||
},
|
||||
},
|
||||
@@ -805,13 +809,16 @@ registry.registerPath({
|
||||
message: z.string(),
|
||||
streamSession: z.object({
|
||||
id: z.string().uuid(),
|
||||
ownerUserId: z.string().uuid(),
|
||||
cameraDeviceId: z.string().uuid(),
|
||||
requesterDeviceId: z.string().uuid(),
|
||||
status: z.string(),
|
||||
streamKey: z.string().nullable(),
|
||||
mediaProvider: z.string(),
|
||||
mediaSessionId: z.string().nullable(),
|
||||
publishEndpoint: z.string().nullable(),
|
||||
subscribeEndpoint: z.string().nullable(),
|
||||
reason: z.string(),
|
||||
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
||||
startedAt: z.string().datetime().nullable(),
|
||||
endedAt: z.string().datetime().nullable().optional(),
|
||||
createdAt: z.string().datetime().optional(),
|
||||
updatedAt: z.string().datetime().optional(),
|
||||
}),
|
||||
}),
|
||||
},
|
||||
@@ -857,89 +864,6 @@ registry.registerPath({
|
||||
},
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: 'get',
|
||||
path: '/streams/{streamSessionId}/publish-credentials',
|
||||
summary: 'Get publish credentials for camera ingest to media provider',
|
||||
tags: ['Streams'],
|
||||
security: [{ bearerDeviceToken: [] }],
|
||||
request: {
|
||||
params: z.object({ streamSessionId: z.string().uuid() }),
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: 'Publish credentials',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.object({
|
||||
provider: z.string(),
|
||||
mediaSessionId: z.string(),
|
||||
publishToken: z.string(),
|
||||
publishUrl: z.string(),
|
||||
expiresInSeconds: z.number().int(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: 'get',
|
||||
path: '/streams/{streamSessionId}/subscribe-credentials',
|
||||
summary: 'Get subscribe credentials for viewing stream from media provider',
|
||||
tags: ['Streams'],
|
||||
security: [{ bearerDeviceToken: [] }],
|
||||
request: {
|
||||
params: z.object({ streamSessionId: z.string().uuid() }),
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: 'Subscribe credentials',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.object({
|
||||
provider: z.string(),
|
||||
mediaSessionId: z.string(),
|
||||
subscribeToken: z.string(),
|
||||
subscribeUrl: z.string(),
|
||||
expiresInSeconds: z.number().int(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: 'get',
|
||||
path: '/streams/{streamSessionId}/playback-token',
|
||||
summary: 'Get short-lived playback token for active stream session',
|
||||
tags: ['Streams'],
|
||||
security: [{ bearerDeviceToken: [] }],
|
||||
request: {
|
||||
params: z.object({ streamSessionId: z.string().uuid() }),
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: 'Playback token response',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.object({
|
||||
streamSessionId: z.string().uuid(),
|
||||
streamKey: z.string(),
|
||||
status: z.string(),
|
||||
playbackToken: z.string(),
|
||||
subscribeUrl: z.string(),
|
||||
mediaProvider: z.string(),
|
||||
expiresInSeconds: z.number().int(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: 'get',
|
||||
path: '/streams/me/list',
|
||||
|
||||
Reference in New Issue
Block a user