Skip to content

Commit

Permalink
fix: wrap onwarn values in a message object (#1428)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjaku authored and Dzianis Dashkevich committed Nov 30, 2023
1 parent 5bfd177 commit 857519c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const parseManifest = ({
}

if (onwarn) {
onwarn(`manifest has no targetDuration defaulting to ${targetDuration}`);
onwarn({ message: `manifest has no targetDuration defaulting to ${targetDuration}` });
}
manifest.targetDuration = targetDuration;
}
Expand All @@ -104,7 +104,7 @@ export const parseManifest = ({
const partTargetDuration = parts.reduce((acc, p) => Math.max(acc, p.duration), 0);

if (onwarn) {
onwarn(`manifest has no partTargetDuration defaulting to ${partTargetDuration}`);
onwarn({ message: `manifest has no partTargetDuration defaulting to ${partTargetDuration}` });
log.error('LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.');
}
manifest.partTargetDuration = partTargetDuration;
Expand Down

0 comments on commit 857519c

Please sign in to comment.