Skip to content

Commit

Permalink
Add port to RTMP & ephemeral flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 18, 2024
1 parent 6a9ff47 commit 3900d14
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/lib/control/video-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default class VideoServiceControl {
if (c.config && c.config.rtmp) {
// Format: rtmp://localhost/mystream
const url = new URL(`/${lease.path}`, c.url.replace(/^http(s)?:/, 'rtmp:'))
url.port = '';
url.port = c.config.rtmpAddress.replace(':', '');

if (lease.stream_user) url.searchParams.append('user', lease.stream_user);
if (lease.stream_pass) url.searchParams.append('pass', lease.stream_pass);
Expand Down
1 change: 1 addition & 0 deletions api/lib/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const VideoLease = pgTable('video_lease', {
updated: timestamp('updated', { withTimezone: true, mode: 'string' }).notNull().default(sql`Now()`),
username: text('username').notNull().references(() => Profile.username),

ephemeral: boolean('ephemeral').notNull().default(false),
expiration: timestamp('expiration', { withTimezone: true, mode: 'string' }).notNull().default(sql`Now() + INTERVAL 1 HOUR;`),
path: text('path').notNull(),
stream_user: text('stream_user'),
Expand Down
1 change: 1 addition & 0 deletions api/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const ProfileResponse = Type.Object({

export const VideoLeaseResponse = createSelectSchema(schemas.VideoLease, {
id: Type.Integer(),
ephemeral: Type.Boolean()
});

export const OverlayResponse = createSelectSchema(schemas.Overlay, {
Expand Down

0 comments on commit 3900d14

Please sign in to comment.