From 05ea5c29e011b9b207b7a6c13d6dd3b9ef73abbd Mon Sep 17 00:00:00 2001 From: Sivan Agranov <88330203+SivanA-Kaltura@users.noreply.github.com> Date: Wed, 10 Aug 2022 10:02:16 +0300 Subject: [PATCH] fix(FEC-12238): [WEB][ShakaPlayer] - upgrade shaka player to v4.1.2 (#202) Upgrade shaka player version and handle modified configuration api --- package.json | 2 +- src/dash-adapter.js | 5 +++++ yarn.lock | 18 +++++++++--------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index ab4a9c27..0c60d4e5 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "mocha": "^8.0.1", "mocha-cli": "^1.0.1", "prettier": "^2.0.5", - "shaka-player": "3.3.3", + "shaka-player": "4.1.2", "sinon": "^9.0.2", "sinon-chai": "^3.5.0", "standard-version": "^6.0.1", diff --git a/src/dash-adapter.js b/src/dash-adapter.js index 1da05c88..64a43b03 100644 --- a/src/dash-adapter.js +++ b/src/dash-adapter.js @@ -270,6 +270,11 @@ export default class DashAdapter extends BaseMediaSourceAdapter { //Merge shaka config with override config, override takes precedence if (Utils.Object.hasPropertyPath(config, 'playback.options.html5.dash')) { Utils.Object.mergeDeep(adapterConfig.shakaConfig, config.playback.options.html5.dash); + + if (Utils.Object.hasPropertyPath(adapterConfig.shakaConfig, 'manifest.dash.defaultPresentationDelay')) { + adapterConfig.shakaConfig.manifest.defaultPresentationDelay = adapterConfig.shakaConfig.manifest.dash.defaultPresentationDelay; + delete adapterConfig.shakaConfig.manifest.dash.defaultPresentationDelay; + } } adapterConfig.network = config.network; return new this(videoElement, source, adapterConfig); diff --git a/yarn.lock b/yarn.lock index d75fc9ea..9a87246d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2989,10 +2989,10 @@ elliptic@^6.0.0, elliptic@^6.5.2: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -eme-encryption-scheme-polyfill@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/eme-encryption-scheme-polyfill/-/eme-encryption-scheme-polyfill-2.0.3.tgz#2ca6e06480e06cceb5e50efd27943ac46c959878" - integrity sha512-44CNFMsqzHdKHrzWxlS7xZ8KUHn5XutBqpmCuWzNIynmAyFInHrrD3ozv/RvK9ZhgV6QY6Easx8EWAmxteNodg== +eme-encryption-scheme-polyfill@^2.0.5: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eme-encryption-scheme-polyfill/-/eme-encryption-scheme-polyfill-2.1.0.tgz#bb5a6975eff3039a102b1961150921be6a3b0c9f" + integrity sha512-vdkP1WyZTBI2LEU+FvbYrjawkz+5fOgSY0qicaWjs/ouVzBKvdbUHfbZ1mLHFOi3l+cdvSq4U6K55mD7J/SEbg== emoji-regex@^7.0.1: version "7.0.3" @@ -7345,12 +7345,12 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -shaka-player@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/shaka-player/-/shaka-player-3.3.3.tgz#c94b12c5ffafd8cbf67baa654cdb4a01fc9ff722" - integrity sha512-E6VRILD9rKunKCQ+lbUnNqqxAvoKuw/6vNaIC+Gz9nW2lYfLX22XCu0wjGZlkvwaR9Q1H+PF7A9iZzzoctSWwg== +shaka-player@4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/shaka-player/-/shaka-player-4.1.2.tgz#4c351d7665b3346717bbd82cdef1196ba9db232c" + integrity sha512-rTj+YMSyO+kbstll3P+8qYxrsaZBDsQlz5xVz1D4A66yJvv9ZqhDFDiEhL6iII5V7BFNA+dOdsR8yKuYHWi8NQ== dependencies: - eme-encryption-scheme-polyfill "^2.0.3" + eme-encryption-scheme-polyfill "^2.0.5" shallow-clone@^3.0.0: version "3.0.1"