diff --git a/index.js b/index.js index 45e866f..884b08e 100644 --- a/index.js +++ b/index.js @@ -479,7 +479,7 @@ class HLSSpliceVod { } } let durationTag = ""; - if (opts.plannedDuration) { + if (opts && opts.plannedDuration) { durationTag = `,DURATION=${opts.plannedDuration / 1000}`; } if (isAssetList) {