Skip to content

Commit

Permalink
Add Ephemeral Passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 18, 2024
1 parent ef35936 commit 1ac74ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/lib/control/video-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ export default class VideoServiceControl {

async generate(opts: {
name: string;
ephemeral: boolean;
expiration: string;
path: string;
username: string;
Expand All @@ -286,6 +287,7 @@ export default class VideoServiceControl {
const lease = await this.config.models.VideoLease.generate({
name: opts.name,
expiration: opts.expiration,
ephemeral: opts.ephemeral,
path: opts.path,
username: opts.username,
proxy: opts.proxy
Expand Down
3 changes: 2 additions & 1 deletion api/routes/video-lease.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default async function router(schema: Schema, config: Config) {
name: Type.String({
description: 'Human readable name'
}),
ephemeral: Type.String({
ephemeral: Type.Boolean({
description: 'CloudTAK View lease - hidden in streaming list',
default: false
}),
Expand Down Expand Up @@ -123,6 +123,7 @@ export default async function router(schema: Schema, config: Config) {

const lease = await videoControl.generate({
name: req.body.name,
ephemeral: req.body.ephemeral,
expiration: moment().add(req.body.duration, 'seconds').toISOString(),
path: req.body.path || randomUUID(),
username: user.email,
Expand Down

0 comments on commit 1ac74ba

Please sign in to comment.