From 9d300bca8a914fc7b6c7f5d456916ac5763a40f8 Mon Sep 17 00:00:00 2001 From: JonathanTGold <62672270+JonathanTGold@users.noreply.github.com> Date: Sun, 2 Oct 2022 16:32:11 +0200 Subject: [PATCH] fix(FEC-12189): Stream doesn't start if open a program with a bookmark (#211) related pr: kaltura/playkit-js#652 Following the removal of the LowLatencyMode from the default configuration here, we need to check if the field exists, otherwise, it will return undefined --- src/dash-adapter.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/dash-adapter.js b/src/dash-adapter.js index 0e2dfc76..ffc226c0 100644 --- a/src/dash-adapter.js +++ b/src/dash-adapter.js @@ -243,8 +243,13 @@ export default class DashAdapter extends BaseMediaSourceAdapter { adapterConfig.useShakaTextTrackDisplay = Utils.Object.getPropertyPath(config, 'text.useShakaTextTrackDisplay'); } if (Utils.Object.hasPropertyPath(config, 'streaming')) { - adapterConfig.forceBreakStall = Utils.Object.getPropertyPath(config, 'streaming.forceBreakStall'); - adapterConfig.lowLatencyMode = Utils.Object.getPropertyPath(config, 'streaming.lowLatencyMode'); + const {streaming} = config; + if (typeof streaming.forceBreakStall === 'boolean') { + adapterConfig.forceBreakStall = streaming.forceBreakStall; + } + if (typeof streaming.lowLatencyMode === 'boolean') { + adapterConfig.lowLatencyMode = streaming.lowLatencyMode; + } } if (Utils.Object.hasPropertyPath(config, 'sources.options')) { const options = config.sources.options;