-
{renderTranscriptButtons && this._renderSkipTranscriptButton()}
0 || downloadDisabled) {
- // download icon already exist or download disabled
- return;
- }
- const translate = {
- label:
Download current transcript
- };
- this._downloadIcon = this.upperBarManager!.add({
- label: translate.label as any,
- svgIcon: {path: icons.DOWNLOAD_ICON, viewBox: `0 0 ${icons.BigSize} ${icons.BigSize}`},
- onClick: this._handleDownload,
- component: withText(translate)((props: {label: string}) => (
-
- ))
- }) as number;
- }
- private _addPrintIcon(): void {
- const {printDisabled} = this.config;
- if (this._printIcon > 0 || printDisabled) {
- // print icon already exist or download disabled
- return;
- }
- const translate = {
- label:
Print current transcript
- };
- this._printIcon = this.upperBarManager!.add({
- label: translate.label as any,
- svgIcon: {path: icons.PRINT_ICON, viewBox: `0 0 ${icons.BigSize} ${icons.BigSize}`},
- onClick: this._handlePrint,
- component: withText(translate)((props: {label: string}) => (
-
- ))
- }) as number;
- }
-
private _addTranscriptItem(): void {
if (Math.max(this._transcriptPanel, this._transcriptIcon) > 0) {
// transcript panel or icon already exist
return;
}
- const {expandMode, position, expandOnFirstPlay, showTime, scrollOffset, searchDebounceTimeout, searchNextPrevDebounceTimeout} = this.config;
+ const {
+ expandMode,
+ position,
+ expandOnFirstPlay,
+ showTime,
+ scrollOffset,
+ searchDebounceTimeout,
+ searchNextPrevDebounceTimeout,
+ downloadDisabled,
+ printDisabled
+ } = this.config;
this._transcriptPanel = this.sidePanelsManager!.add({
label: 'Transcript',
panelComponent: () => {
@@ -282,6 +237,10 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
kitchenSinkActive={this._isPluginActive()}
toggledWithEnter={this._triggeredByKeyboard}
onClose={this._handleClose}
+ downloadDisabled={getConfigValue(downloadDisabled, isBoolean, false)}
+ onDownload={this._handleDownload}
+ printDisabled={getConfigValue(printDisabled, isBoolean, false)}
+ onPrint={this._handlePrint}
/>
);
},
@@ -368,14 +327,6 @@ export class TranscriptPlugin extends KalturaPlayer.core.BasePlugin {
this._transcriptIcon = -1;
this._pluginButtonRef = null;
}
- if (this._printIcon > 0) {
- this.upperBarManager!.remove(this._printIcon);
- this._printIcon = -1;
- }
- if (this._downloadIcon > 0) {
- this.upperBarManager!.remove(this._downloadIcon);
- this._downloadIcon = -1;
- }
this._captionMap = new Map();
this._activeCaptionMapId = '';
this._isLoading = false;
diff --git a/yarn.lock b/yarn.lock
index 5c42aa7..d86e575 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -130,28 +130,29 @@
resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b"
integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==
-"@playkit-js/common@^1.1.2":
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/@playkit-js/common/-/common-1.1.2.tgz#35e86126d87f9006795033bce7e3d9a1b885b61f"
- integrity sha512-N/mcYl9sKpdRs56lUwNxdRZZtljQE35+K8XeY15d7Vcalnh5tWgcY4zqTYAqT3mz4wL1hY15fHe5rYuDF0WH1A==
+"@playkit-js/common@1.1.6":
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/@playkit-js/common/-/common-1.1.6.tgz#4e3ec59e3b9e0273a9d0c6bfa0425468f597d01a"
+ integrity sha512-NNulGulMfK0crRDdOJTBIUUd2z8Ap1vf88PkSeVUK32j/ULgCII9djKEdxyBgn5lSj9ZI+UObDCPezDcMwniWA==
dependencies:
"@playkit-js/playkit-js-ui" "^0.74.0"
+ classnames "^2.3.2"
linkify-it "^4.0.1"
-"@playkit-js/playkit-js-dash@1.30.2":
- version "1.30.2"
- resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-dash/-/playkit-js-dash-1.30.2.tgz#b539a16dff6dae1afa89f7113d779b7dcb804309"
- integrity sha512-v1HZfp0iShCMY79zR6uqmsnvbjTy5nP2+oi5N2xxidZl3Be19ZeePHXsOoZ65kkQJthYhbnOnVUlEQbRzg3kwA==
+"@playkit-js/playkit-js-dash@1.33.0":
+ version "1.33.0"
+ resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-dash/-/playkit-js-dash-1.33.0.tgz#1c8bc86f6080ce89ed4997978429c4167c5779d5"
+ integrity sha512-3v+Q6/krt4GGe78ra2HC9X5llGbp6+bGdqH8K1DdDiuSu9PRP809OH7Sl8+EJNN6ZbAk+oW9aCPQPycDYMB6sw==
-"@playkit-js/playkit-js-hls@1.30.1":
- version "1.30.1"
- resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-hls/-/playkit-js-hls-1.30.1.tgz#1c6298cafadfabe9510e013f319774f486f3a4c6"
- integrity sha512-92nrsOXBQveF+BmKqC2LxLp+zGjqKvBCh5vL8Ea0+COzha/jPovKtwhGxzyF3gTIukYoocMC8IisFFQCIPkCmw==
+"@playkit-js/playkit-js-hls@1.32.0":
+ version "1.32.0"
+ resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-hls/-/playkit-js-hls-1.32.0.tgz#aff7b637334e0a000ce1f3777c11c46991498eb4"
+ integrity sha512-lvoytiaibQhI/RptISPQTFfi2EbPbtKyuLbEBrR4fEx8ZAMHrvu2TL648TnVYbkyyJOCXV26Bn7cH/qpDXD2Ug==
-"@playkit-js/playkit-js-ui@^0.72.0":
- version "0.72.0"
- resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-ui/-/playkit-js-ui-0.72.0.tgz#d8b855f2a339903c3207f04c5890a25538f22933"
- integrity sha512-+NSxOET30Ut4W/WNaepZCnaBHJSLOoAPZbBrXwVucA5Z3NG8wTmsoEd58FCwpT8vWTUwVSFxzli/uUiwfXlYHQ==
+"@playkit-js/playkit-js-ui@0.75.2":
+ version "0.75.2"
+ resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-ui/-/playkit-js-ui-0.75.2.tgz#4ab978b83ff18d58a41469b8bcc98d80d455a284"
+ integrity sha512-VLSWcQSBUsjaT0blolXFX09B5WLclLxxxHKn/wrlqGMuWdrBwFHLQWJAExb0IRF0FYjxdEMikexducmmrXKegA==
dependencies:
preact "^10.3.4"
preact-i18n "^2.0.0-preactx.2"
@@ -178,10 +179,10 @@
react-redux "^7.2.0"
redux "^4.0.5"
-"@playkit-js/playkit-js@^0.80.3":
- version "0.80.3"
- resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js/-/playkit-js-0.80.3.tgz#07e47e560aeadc6ca3b20afde87dfdf4ab8f7ac0"
- integrity sha512-l7WWGLqL4KnP+TZZzGxsgQLj4chYZYsdF+35laSzFSxzJXsTi7ra8HCtNCWNHu5y3mfer2jjhl5kjMyCU6dt4Q==
+"@playkit-js/playkit-js@0.82.0":
+ version "0.82.0"
+ resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js/-/playkit-js-0.82.0.tgz#c0be3644927eca65fe7d2bb0d0a0c369a3c362fc"
+ integrity sha512-JzVzM3FB+zjGc780QYBB7A8eUrCQbbEY6OhyAj7pO77NxhFTOLQgDAZcj1ZyWyrC8LCb6kUOQd6z7VNYEWCxoQ==
dependencies:
js-logger "^1.6.0"
ua-parser-js "1.0.2"
@@ -316,6 +317,13 @@
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"
integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==
+"@types/preact-i18n@^2.3.1":
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/@types/preact-i18n/-/preact-i18n-2.3.2.tgz#7b5a31e1c84ead424e8c6ed3d57a02487d430fc7"
+ integrity sha512-j1J/f9yzds7X3RP7oIO5wL+owXJyULv0qRWcX/eVGP/Ojw8SdTjXAi722vv2Iv5GtMgshVCS1QEQFJRT8/qwHQ==
+ dependencies:
+ preact "^10.0.0"
+
"@types/prop-types@*":
version "15.7.5"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf"
@@ -1031,6 +1039,11 @@ ci-info@^3.2.0:
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.2.tgz#6d2967ffa407466481c6c90b6e16b3098f080128"
integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==
+classnames@^2.3.2:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924"
+ integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==
+
clean-stack@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
@@ -1810,10 +1823,10 @@ electron-to-chromium@^1.4.188:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.202.tgz#0c2ed733f42b02ec49a955c5badfcc65888c390b"
integrity sha512-JYsK2ex9lmQD27kj19fhXYxzFJ/phLAkLKHv49A5UY6kMRV2xED3qMMLg/voW/+0AR6wMiI+VxlmK9NDtdxlPA==
-eme-encryption-scheme-polyfill@^2.0.3:
- 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==
+eme-encryption-scheme-polyfill@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/eme-encryption-scheme-polyfill/-/eme-encryption-scheme-polyfill-2.1.1.tgz#91c823ed584e8ec5a9f03a6a676def8f80c57a4c"
+ integrity sha512-njD17wcUrbqCj0ArpLu5zWXtaiupHb/2fIUQGdInf83GlI+Q6mmqaPGLdrke4savKAu15J/z1Tg/ivDgl14g0g==
emoji-regex@^8.0.0:
version "8.0.0"
@@ -2476,10 +2489,10 @@ has@^1.0.3:
dependencies:
function-bind "^1.1.1"
-hls.js@^1.1.5:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.2.0.tgz#e213773be09d6f99f08cefbf608c4a1fe226f998"
- integrity sha512-QIEQIUpBRhcpBMq3NA+/qozG8lbNfVekuX7kCMUlhiVu4382xFWsnwcuBe/CA4Gp/wB/pf2aRBaGRFlxh/FN8g==
+hls.js@1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.3.1.tgz#2e43949aeaee8f3d54cabd7c4c1a9a718a03e7c2"
+ integrity sha512-6f4Qyrfj9sNUWMzNFKruqeD2KdisOwQ1GQJqnWAgMQ1hequlFK7e2dmF9qQD3mF/RI76hvztCMBptlPb+HcDow==
hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
version "3.3.2"
@@ -2971,20 +2984,21 @@ jsprim@^2.0.2:
json-schema "0.4.0"
verror "1.10.0"
-"kaltura-player-js@https://github.com/kaltura/kaltura-player-js.git#master":
- version "3.4.0"
- resolved "https://github.com/kaltura/kaltura-player-js.git#4abd4c33fc3c24a4c498f874117021ecf97addc4"
+"kaltura-player-js@https://github.com/kaltura/kaltura-player-js.git#v3.12.1":
+ version "3.12.1"
+ resolved "https://github.com/kaltura/kaltura-player-js.git#3288e70b0bdc1e8ea1e126327790f8e07f6123bf"
dependencies:
"@babel/polyfill" "^7.0.0"
- "@playkit-js/playkit-js" "^0.80.3"
- "@playkit-js/playkit-js-dash" "1.30.2"
- "@playkit-js/playkit-js-hls" "1.30.1"
- "@playkit-js/playkit-js-ui" "^0.72.0"
- hls.js "^1.1.5"
+ "@playkit-js/playkit-js" "0.82.0"
+ "@playkit-js/playkit-js-dash" "1.33.0"
+ "@playkit-js/playkit-js-hls" "1.32.0"
+ "@playkit-js/playkit-js-ui" "0.75.2"
+ "@types/preact-i18n" "^2.3.1"
+ hls.js "1.3.1"
intersection-observer "^0.12.0"
- playkit-js-providers "https://github.com/kaltura/playkit-js-providers.git#v2.35.1"
+ playkit-js-providers "https://github.com/kaltura/playkit-js-providers.git#v2.39.0"
proxy-polyfill "^0.3.0"
- shaka-player "3.3.3"
+ shaka-player "4.3.3"
keyv@3.0.0:
version "3.0.0"
@@ -3826,9 +3840,9 @@ pkg-dir@^4.2.0:
dependencies:
find-up "^4.0.0"
-"playkit-js-providers@https://github.com/kaltura/playkit-js-providers.git#v2.35.1":
- version "2.35.1"
- resolved "https://github.com/kaltura/playkit-js-providers.git#6e6d586c5c4695cdaab8f2b9fe16c9a36477e1f3"
+"playkit-js-providers@https://github.com/kaltura/playkit-js-providers.git#v2.39.0":
+ version "2.39.0"
+ resolved "https://github.com/kaltura/playkit-js-providers.git#ddaac7ae611eab35ad33249061bbca8f3e4fc787"
postcss-modules-extract-imports@^3.0.0:
version "3.0.0"
@@ -3887,6 +3901,11 @@ preact-i18n@^2.0.0-preactx.2:
dependencies:
dlv "^1.1.2"
+preact@^10.0.0:
+ version "10.13.0"
+ resolved "https://registry.yarnpkg.com/preact/-/preact-10.13.0.tgz#f8bd3cf257a4dbe41da71a52131b79916d4ca89d"
+ integrity sha512-ERdIdUpR6doqdaSIh80hvzebHB7O6JxycOhyzAeLEchqOq/4yueslQbfnPwXaNhAYacFTyCclhwkEbOumT0tHw==
+
preact@^10.3.4, preact@^10.4.1:
version "10.10.0"
resolved "https://registry.yarnpkg.com/preact/-/preact-10.10.0.tgz#7434750a24b59dae1957d95dc0aa47a4a8e9a180"
@@ -4466,12 +4485,12 @@ setprototypeof@1.2.0:
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
-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.3.3:
+ version "4.3.3"
+ resolved "https://registry.yarnpkg.com/shaka-player/-/shaka-player-4.3.3.tgz#8e35bd3f6faad4002395590c259d487c79240d64"
+ integrity sha512-UMaTwebmrpwYNFNnP8iRSR8cMdOvUMnisDa38Wkmmd63rWOQWbPq1DI1BIEu9oAUPIKXav6teelLRycdTnWKaQ==
dependencies:
- eme-encryption-scheme-polyfill "^2.0.3"
+ eme-encryption-scheme-polyfill "^2.1.1"
shallow-clone@^3.0.0:
version "3.0.1"