From beccfa1e0a3b86ad79483298337c0404d92c852a Mon Sep 17 00:00:00 2001 From: Ian Jakubek <35679622+ianjaku@users.noreply.github.com> Date: Wed, 18 Oct 2023 15:18:50 +0200 Subject: [PATCH] fix: wrap onwarn values in a message object (#1428) --- src/manifest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manifest.js b/src/manifest.js index 7c55d93ab..a3f741209 100644 --- a/src/manifest.js +++ b/src/manifest.js @@ -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; } @@ -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;