Skip to content

Commit

Permalink
Config parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 31, 2024
1 parent 4347996 commit 5ad7a2a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions persist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ cron.schedule('0,10,20,30,40,50 * * * * *', async () => {

// This is janky but MediaMTX wants `no` as a string and not a boolean
// and I can't get the YAML library to respect that...
config = config
.replace(/^encryption: no/, 'encryption: "no"')
.replace(/^rtmpEncryption: no/, 'rtmpEncryption: "no"')
config = config.split('\n').map((line) => {
line = line.replace(/^encryption: no/, 'encryption: "no"')
line = line.replace(/^rtmpEncryption: no/, 'rtmpEncryption: "no"')
return line
}).join('\n');


console.log('PATHS', paths);
Expand Down

0 comments on commit 5ad7a2a

Please sign in to comment.