Skip to content

Commit

Permalink
Merge pull request #189 from SuperFlyTV/fix/length-param
Browse files Browse the repository at this point in the history
fix: allow length of 0
  • Loading branch information
mint-dewit authored Oct 3, 2023
2 parents 69bc9e7 + 02d082d commit afd7217
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/serializers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ const channelOptLayerOptSerializer = (

const clipCommandSerializer = (_command: Commands, { clip, loop, inPoint, seek, length, clearOn404 }: ClipParameters) =>
(clip ? `"${clip}"` : '') +
(loop ? ' LOOP' : '') +
(inPoint ? ' IN ' + inPoint : '') +
(seek ? ' SEEK ' + seek : '') +
(length ? ' LENGTH ' + length : '') +
(clearOn404 ? ' CLEAR_ON_404' : '')
(loop === true ? ' LOOP' : '') +
(inPoint !== undefined ? ' IN ' + inPoint : '') +
(seek !== undefined ? ' SEEK ' + seek : '') +
(length !== undefined ? ' LENGTH ' + length : '') +
(clearOn404 === true ? ' CLEAR_ON_404' : '')
const decklinkCommandSerializer = (_: Commands, { device, format }: DecklinkParameters) =>
'DECKLINK ' + device + (format ? ' FORMAT ' + format : '')
const htmlCommandSerializerr = (_: Commands, { url }: HtmlParameters) => '[html] ' + url
Expand Down

0 comments on commit afd7217

Please sign in to comment.