@playkit-js/transcript 3.4.2-canary.4-77e14dc → 3.4.2-canary.6-e5bbd6d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -1
- package/dist/playkit-transcript.js +1 -1
- package/dist/playkit-transcript.js.map +1 -1
- package/package.json +16 -11
- package/src/components/plugin-button/plugin-button.tsx +1 -1
- package/src/components/popover-menu/popover-menu.tsx +11 -3
- package/src/components/transcript-menu/transcript-menu.tsx +12 -6
- package/src/transcript-plugin.tsx +1 -1
- package/translations/de.i18n.json +0 -1
- package/translations/en.i18n.json +1 -1
- package/translations/es.i18n.json +0 -1
- package/translations/fi.i18n.json +0 -1
- package/translations/fr.i18n.json +0 -1
- package/translations/fr_ca.i18n.json +0 -1
- package/translations/it.i18n.json +0 -1
- package/translations/ja.i18n.json +0 -1
- package/translations/ko.i18n.json +0 -1
- package/translations/nl.i18n.json +0 -1
- package/translations/pt_br.i18n.json +0 -1
- package/translations/ru.i18n.json +0 -1
- package/translations/zh_cn.i18n.json +0 -1
- package/translations/zh_tw.i18n.json +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playkit-js/transcript",
|
|
3
|
-
"version": "3.4.2-canary.
|
|
3
|
+
"version": "3.4.2-canary.6-e5bbd6d",
|
|
4
4
|
"main": "dist/playkit-transcript.js",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"private": false,
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
"url": "git+https://github.com/kaltura/playkit-js-transcript.git"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
+
"@playkit-js/kaltura-player-js": "canary",
|
|
16
17
|
"conventional-github-releaser": "3.1.3",
|
|
17
18
|
"cross-env": "^7.0.3",
|
|
18
19
|
"css-loader": "^6.7.1",
|
|
19
|
-
"
|
|
20
|
+
"cypress": "^12.12.0",
|
|
21
|
+
"playwright-webkit": "^1.33.0",
|
|
20
22
|
"preact": "^10.4.1",
|
|
21
23
|
"prettier": "^2.6.2",
|
|
22
24
|
"sass": "^1.54.3",
|
|
@@ -31,7 +33,7 @@
|
|
|
31
33
|
"webpack-dev-server": "^4.9.0"
|
|
32
34
|
},
|
|
33
35
|
"peerDependencies": {
|
|
34
|
-
"kaltura-player-js": "
|
|
36
|
+
"@playkit-js/kaltura-player-js": "canary"
|
|
35
37
|
},
|
|
36
38
|
"scripts": {
|
|
37
39
|
"clean": "rm -rf ./dist",
|
|
@@ -39,11 +41,15 @@
|
|
|
39
41
|
"build": "webpack --mode production",
|
|
40
42
|
"dev": "webpack-dev-server --mode development",
|
|
41
43
|
"watch": "webpack --progress --color --watch --mode development",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
+
"cy:open": "cypress open",
|
|
45
|
+
"cy:run": "yarn run cy:run:chrome && yarn run cy:run:firefox && yarn run cy:run:edge && yarn run cy:run:safari",
|
|
46
|
+
"cy:run:chrome": "cypress run --browser chrome --config video=false",
|
|
47
|
+
"cy:run:firefox": "cypress run --browser firefox --config video=false",
|
|
48
|
+
"cy:run:edge": "cypress run --browser edge --config video=false",
|
|
49
|
+
"cy:run:safari": "cypress run --browser webkit --config video=false",
|
|
44
50
|
"test:prepare": "yarn run build && yes | cp -i ./dist/playkit-transcript.js ./cypress/public/plugin.js",
|
|
45
51
|
"test:watch": "yarn run test:prepare && cypress open",
|
|
46
|
-
"test": "yarn run test:prepare &&
|
|
52
|
+
"test": "yarn run test:prepare && yarn run cy:run",
|
|
47
53
|
"release": "standard-version",
|
|
48
54
|
"pushTaggedRelease": "git push --follow-tags --no-verify origin master",
|
|
49
55
|
"prettier:fix": "prettier --write ."
|
|
@@ -68,17 +74,16 @@
|
|
|
68
74
|
"html5 player"
|
|
69
75
|
],
|
|
70
76
|
"dependencies": {
|
|
71
|
-
"@playkit-js/common": "1.
|
|
72
|
-
"@playkit-js/playkit-js-ui": "^0.
|
|
73
|
-
"@playkit-js/ui-managers": "^1.3.
|
|
74
|
-
"cypress": "^12.3.0",
|
|
77
|
+
"@playkit-js/common": "^1.2.3",
|
|
78
|
+
"@playkit-js/playkit-js-ui": "^0.77.1",
|
|
79
|
+
"@playkit-js/ui-managers": "^1.3.8",
|
|
75
80
|
"stream-browserify": "^3.0.0"
|
|
76
81
|
},
|
|
77
82
|
"kaltura": {
|
|
78
83
|
"name": "playkit-js-transcript",
|
|
79
84
|
"dependencies": {
|
|
80
85
|
"playkit-kaltura-cuepoints": "3.0.4",
|
|
81
|
-
"playkit-ui-managers": "1.3.
|
|
86
|
+
"playkit-ui-managers": "1.3.8"
|
|
82
87
|
}
|
|
83
88
|
}
|
|
84
89
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {h} from 'preact';
|
|
2
2
|
import * as styles from './plugin-button.scss';
|
|
3
|
-
import {ui} from 'kaltura-player-js';
|
|
3
|
+
import {ui} from '@playkit-js/kaltura-player-js';
|
|
4
4
|
import {icons} from '../icons';
|
|
5
5
|
import {A11yWrapper, OnClick} from '@playkit-js/common/dist/hoc/a11y-wrapper';
|
|
6
6
|
|
|
@@ -2,6 +2,7 @@ import {A11yWrapper} from '@playkit-js/common/dist/hoc/a11y-wrapper';
|
|
|
2
2
|
import {h, Component, VNode} from 'preact';
|
|
3
3
|
|
|
4
4
|
const {Tooltip} = KalturaPlayer.ui.components;
|
|
5
|
+
const {withText, Text} = KalturaPlayer.ui.preacti18n;
|
|
5
6
|
|
|
6
7
|
const {withEventManager} = KalturaPlayer.ui.Event;
|
|
7
8
|
const {TAB} = KalturaPlayer.ui.utils.KeyMap;
|
|
@@ -16,7 +17,7 @@ interface PopoverMenuItemData {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
interface PopoverMenuProps {
|
|
19
|
-
|
|
20
|
+
moreOptionsLabel?: string;
|
|
20
21
|
eventManager?: any;
|
|
21
22
|
children?: VNode;
|
|
22
23
|
items: Array<PopoverMenuItemData>;
|
|
@@ -25,7 +26,11 @@ interface PopoverMenuProps {
|
|
|
25
26
|
interface PopoverMenuState {
|
|
26
27
|
isOpen: boolean;
|
|
27
28
|
}
|
|
29
|
+
const translates = {
|
|
30
|
+
moreOptionsLabel: <Text id="transcript.more_options">More transcript options</Text>
|
|
31
|
+
};
|
|
28
32
|
|
|
33
|
+
@withText(translates)
|
|
29
34
|
@withEventManager
|
|
30
35
|
class PopoverMenu extends Component<PopoverMenuProps, PopoverMenuState> {
|
|
31
36
|
private _controlElementRef: HTMLDivElement | null = null;
|
|
@@ -98,12 +103,14 @@ class PopoverMenu extends Component<PopoverMenuProps, PopoverMenuState> {
|
|
|
98
103
|
};
|
|
99
104
|
|
|
100
105
|
render() {
|
|
101
|
-
const {
|
|
106
|
+
const {children, items} = this.props;
|
|
102
107
|
|
|
103
108
|
const popoverMenuContent = (
|
|
104
109
|
<div className={styles.popoverContainer}>
|
|
105
110
|
<A11yWrapper onClick={() => this.togglePopover(true)}>
|
|
106
111
|
<div
|
|
112
|
+
aria-label={this.props.moreOptionsLabel!}
|
|
113
|
+
tabIndex={0}
|
|
107
114
|
data-testid="popover-anchor-container"
|
|
108
115
|
className={`${styles.popoverAnchorContainer} ${this.state.isOpen ? styles.active : ''}`}
|
|
109
116
|
ref={node => {
|
|
@@ -124,6 +131,7 @@ class PopoverMenu extends Component<PopoverMenuProps, PopoverMenuState> {
|
|
|
124
131
|
? items.map(({label, onClick, testId, isDisabled}, index) => {
|
|
125
132
|
return (
|
|
126
133
|
<A11yWrapper
|
|
134
|
+
role="menuitem"
|
|
127
135
|
onClick={() => {
|
|
128
136
|
if (!isDisabled) {
|
|
129
137
|
this.closePopover();
|
|
@@ -164,7 +172,7 @@ class PopoverMenu extends Component<PopoverMenuProps, PopoverMenuState> {
|
|
|
164
172
|
popoverMenuContent
|
|
165
173
|
) : (
|
|
166
174
|
<div>
|
|
167
|
-
<Tooltip label={
|
|
175
|
+
<Tooltip label={this.props.moreOptionsLabel!}>{popoverMenuContent}</Tooltip>
|
|
168
176
|
</div>
|
|
169
177
|
);
|
|
170
178
|
}
|
|
@@ -3,9 +3,9 @@ import {PopoverMenu} from '../popover-menu';
|
|
|
3
3
|
import {PopoverMenuItemData} from '../popover-menu';
|
|
4
4
|
|
|
5
5
|
import {Button, ButtonType} from '@playkit-js/common/dist/components/button';
|
|
6
|
+
const {withText, Text} = KalturaPlayer.ui.preacti18n;
|
|
6
7
|
|
|
7
8
|
interface TranscriptMenuProps {
|
|
8
|
-
printDownloadAreaLabel?: string;
|
|
9
9
|
printTranscript?: string;
|
|
10
10
|
downloadTranscript?: string;
|
|
11
11
|
onDownload: () => void;
|
|
@@ -19,16 +19,22 @@ interface TranscriptMenuState {
|
|
|
19
19
|
items: Array<PopoverMenuItemData>;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
const translates = {
|
|
23
|
+
printTranscript: <Text id="transcript.more_options">Print current transcript</Text>,
|
|
24
|
+
downloadTranscript: <Text id="transcript.more_options">Download current transcript</Text>
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
@withText(translates)
|
|
22
28
|
class TranscriptMenu extends Component<TranscriptMenuProps, TranscriptMenuState> {
|
|
23
29
|
constructor(props: TranscriptMenuProps) {
|
|
24
30
|
super();
|
|
25
31
|
|
|
26
|
-
const {downloadDisabled, onDownload, printDisabled, onPrint,
|
|
32
|
+
const {downloadDisabled, onDownload, printDisabled, onPrint, printTranscript, downloadTranscript, isLoading} = props;
|
|
27
33
|
const items = [];
|
|
28
34
|
if (!downloadDisabled) {
|
|
29
35
|
items.push({
|
|
30
36
|
testId: 'download-menu-item',
|
|
31
|
-
label:
|
|
37
|
+
label: downloadTranscript!,
|
|
32
38
|
onClick: onDownload,
|
|
33
39
|
isDisabled: isLoading
|
|
34
40
|
});
|
|
@@ -37,7 +43,7 @@ class TranscriptMenu extends Component<TranscriptMenuProps, TranscriptMenuState>
|
|
|
37
43
|
if (!printDisabled) {
|
|
38
44
|
items.push({
|
|
39
45
|
testId: 'print-menu-item',
|
|
40
|
-
label:
|
|
46
|
+
label: printTranscript!,
|
|
41
47
|
onClick: onPrint,
|
|
42
48
|
isDisabled: isLoading
|
|
43
49
|
});
|
|
@@ -48,8 +54,8 @@ class TranscriptMenu extends Component<TranscriptMenuProps, TranscriptMenuState>
|
|
|
48
54
|
|
|
49
55
|
render() {
|
|
50
56
|
return this.state.items.length ? (
|
|
51
|
-
<PopoverMenu
|
|
52
|
-
<Button type={ButtonType.borderless} icon={'more'}
|
|
57
|
+
<PopoverMenu items={this.state.items}>
|
|
58
|
+
<Button type={ButtonType.borderless} icon={'more'} tabIndex={-1} />
|
|
53
59
|
</PopoverMenu>
|
|
54
60
|
) : null;
|
|
55
61
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {h} from 'preact';
|
|
2
2
|
import {OnClickEvent} from '@playkit-js/common/dist/hoc/a11y-wrapper';
|
|
3
|
-
import {ui} from 'kaltura-player-js';
|
|
3
|
+
import {ui} from '@playkit-js/kaltura-player-js';
|
|
4
4
|
import {UpperBarManager, SidePanelsManager} from '@playkit-js/ui-managers';
|
|
5
5
|
import {ObjectUtils, downloadContent, printContent} from './utils';
|
|
6
6
|
import {icons} from './components/icons';
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"transcript": {
|
|
4
4
|
"hide_plugin": "Transkript ausblenden",
|
|
5
5
|
"show_plugin": "Transkript anzeigen",
|
|
6
|
-
"print_download_area_label": "Aktuelle Abschrift herunterladen oder drucken",
|
|
7
6
|
"print_transcript": "Aktuelles Transkript drucken",
|
|
8
7
|
"download_transcript": "Aktuelles Transkript herunterladen",
|
|
9
8
|
"search": "Suche im Transkript",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"transcript": {
|
|
4
4
|
"hide_plugin": "Hide Transcript",
|
|
5
5
|
"show_plugin": "Show Transcript",
|
|
6
|
-
"
|
|
6
|
+
"more_options": "More transcript options",
|
|
7
7
|
"print_transcript": "Print current transcript",
|
|
8
8
|
"download_transcript": "Download current transcript",
|
|
9
9
|
"search": "Search in Transcript",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"transcript": {
|
|
4
4
|
"hide_plugin": "Ocultar la transcripción",
|
|
5
5
|
"show_plugin": "Mostrar la transcripción",
|
|
6
|
-
"print_download_area_label": "Descargar o imprimir la transcripción",
|
|
7
6
|
"print_transcript": "Imprimir la transcripción",
|
|
8
7
|
"download_transcript": "Descargar la transcripción",
|
|
9
8
|
"search": "Buscar en la transcripción",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"transcript": {
|
|
4
4
|
"hide_plugin": "Piilota tekstitallenne",
|
|
5
5
|
"show_plugin": "Näytä tekstitallenne",
|
|
6
|
-
"print_download_area_label": "Lataa tai tulosta nykyinen tekstitallenne",
|
|
7
6
|
"print_transcript": "Tulosta nykyinen tekstitallenne",
|
|
8
7
|
"download_transcript": "Lataa nykyinen tekstitallenne",
|
|
9
8
|
"search": "Hae tekstitallenteesta",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"transcript": {
|
|
4
4
|
"hide_plugin": "Cacher le relevé",
|
|
5
5
|
"show_plugin": "Afficher le relevé",
|
|
6
|
-
"print_download_area_label": "Télécharger ou imprimer le relevé actuel",
|
|
7
6
|
"print_transcript": "Imprimer le relevé actuel",
|
|
8
7
|
"download_transcript": "Télécharger le relevé actuel",
|
|
9
8
|
"search": "Rechercher dans le relevé",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"transcript": {
|
|
4
4
|
"hide_plugin": "Masquer la transcription",
|
|
5
5
|
"show_plugin": "Afficher la transcription",
|
|
6
|
-
"print_download_area_label": "Téléverser ou imprimer la transcription actuelle",
|
|
7
6
|
"print_transcript": "Imprimer la transcription actuelle",
|
|
8
7
|
"download_transcript": "Téléverser la transcription actuelle",
|
|
9
8
|
"search": "Recherche dans la transcription",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"transcript": {
|
|
4
4
|
"hide_plugin": "Nascondi trascrizione",
|
|
5
5
|
"show_plugin": "Mostra trascrizione",
|
|
6
|
-
"print_download_area_label": "Scarica o stampa trascrizione corrente",
|
|
7
6
|
"print_transcript": "Stampa trascrizione corrente",
|
|
8
7
|
"download_transcript": "Scarica trascrizione corrente",
|
|
9
8
|
"search": "Cerca in Trascrizione",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"transcript": {
|
|
4
4
|
"hide_plugin": "Transcriptie verbergen",
|
|
5
5
|
"show_plugin": "Transcriptie tonen",
|
|
6
|
-
"print_download_area_label": "Huidige transcriptie afdrukken of downloaden",
|
|
7
6
|
"print_transcript": "Huidige transcriptie afdrukken",
|
|
8
7
|
"download_transcript": "Huidige transcriptie downloaden",
|
|
9
8
|
"search": "In transcriptie zoeken",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"transcript": {
|
|
4
4
|
"hide_plugin": "Ocultar transcrição",
|
|
5
5
|
"show_plugin": "Mostrar transcrição",
|
|
6
|
-
"print_download_area_label": "Baixar ou imprimir transcrição atual",
|
|
7
6
|
"print_transcript": "Imprimir transcrição atual",
|
|
8
7
|
"download_transcript": "Baixar transcrição atual",
|
|
9
8
|
"search": "Buscar na transcrição",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"transcript": {
|
|
4
4
|
"hide_plugin": "Скрыть текстовую расшифровку",
|
|
5
5
|
"show_plugin": "Показать текстовую расшифровку",
|
|
6
|
-
"print_download_area_label": "Скачать или распечатать текущую текстовую расшифровку",
|
|
7
6
|
"print_transcript": "Распечатать текущую текстовую расшифровку",
|
|
8
7
|
"download_transcript": "Скачать текущую текстовую расшифровку",
|
|
9
8
|
"search": "Искать в текстовой расшифровке",
|