@playkit-js/transcript 2.1.5-canary.0-d147d48 → 2.1.5-canary.17-c901bf0

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/LICENSE +5 -5
  3. package/README.md +122 -24
  4. package/dist/playkit-transcript.js +1 -31
  5. package/dist/playkit-transcript.js.map +1 -1
  6. package/package.json +54 -50
  7. package/src/components/caption/caption.scss +1 -1
  8. package/src/components/caption/caption.tsx +118 -140
  9. package/src/components/caption/index.ts +1 -1
  10. package/src/components/caption-list/captionList.scss +8 -8
  11. package/src/components/caption-list/captionList.tsx +115 -117
  12. package/src/components/caption-list/index.ts +1 -1
  13. package/src/components/close-button/close-button.scss +11 -0
  14. package/src/components/close-button/index.tsx +23 -0
  15. package/src/components/download-print-menu/download-print-icons.tsx +23 -0
  16. package/src/components/download-print-menu/download-print-menu.scss +40 -51
  17. package/src/components/download-print-menu/download-print-menu.tsx +150 -125
  18. package/src/components/download-print-menu/index.ts +1 -1
  19. package/src/components/icons/index.ts +9 -0
  20. package/src/components/plugin-button/plugin-button.scss +26 -0
  21. package/src/components/plugin-button/plugin-button.tsx +29 -0
  22. package/src/components/popover-menu/index.ts +1 -1
  23. package/src/components/popover-menu/popover-menu.scss +3 -3
  24. package/src/components/popover-menu/popover-menu.tsx +25 -25
  25. package/src/components/search/index.ts +1 -1
  26. package/src/components/search/search.scss +5 -13
  27. package/src/components/search/search.tsx +197 -144
  28. package/src/components/spinner/index.ts +1 -1
  29. package/src/components/spinner/spinner.scss +58 -50
  30. package/src/components/spinner/spinner.tsx +59 -9
  31. package/src/components/transcript/error-icon.tsx +67 -0
  32. package/src/components/transcript/index.ts +1 -1
  33. package/src/components/transcript/transcript.scss +12 -39
  34. package/src/components/transcript/transcript.tsx +347 -453
  35. package/src/global.d.ts +6 -6
  36. package/src/index.ts +13 -1
  37. package/src/transcript-plugin.tsx +210 -391
  38. package/src/types/index.ts +3 -0
  39. package/src/types/transcript-config.ts +11 -0
  40. package/src/types/transcript-item-data.ts +29 -0
  41. package/src/types/types-ui.ts +11 -0
  42. package/src/utils/debounce.ts +36 -0
  43. package/src/utils/index.ts +4 -0
  44. package/src/utils/object-utils.ts +34 -0
  45. package/src/utils/popover/popover.scss +30 -0
  46. package/src/utils/popover/popover.tsx +178 -0
  47. package/src/utils/utils.ts +86 -0
  48. package/src/variables.scss +14 -0
  49. package/src/assets/arrow-up.svg +0 -9
  50. package/src/assets/clear.svg +0 -9
  51. package/src/assets/close.svg +0 -10
  52. package/src/assets/down.svg +0 -9
  53. package/src/assets/download-over.svg +0 -9
  54. package/src/assets/download.svg +0 -9
  55. package/src/assets/error.svg +0 -36
  56. package/src/assets/loader.svg +0 -36
  57. package/src/assets/print-over.svg +0 -9
  58. package/src/assets/print.svg +0 -9
  59. package/src/assets/search.svg +0 -9
  60. package/src/assets/transcript-icon-over.svg +0 -9
  61. package/src/assets/transcript-icon.svg +0 -9
  62. package/src/assets/up.svg +0 -9
  63. package/src/transcript-plugin.scss +0 -31
  64. package/src/utils.ts +0 -192
package/CHANGELOG.md CHANGED
@@ -2,7 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [2.1.5-canary.0-d147d48](https://github.com/kaltura/playkit-js-transcript/compare/v2.1.4...v2.1.5-canary.0-d147d48) (2022-01-19)
5
+ ### [2.1.5-canary.17-c901bf0](https://github.com/kaltura/playkit-js-transcript/compare/v2.1.4...v2.1.5-canary.17-c901bf0) (2022-08-10)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **FEV-1173:** remove contrib kitchen sink ([fb40b3e](https://github.com/kaltura/playkit-js-transcript/commit/fb40b3e10a99cd2cf7ffb41ac5721ab6b3210501))
11
+ * **FEV-1273:** handle timed metadata, remove kaltura-client ([357f8b5](https://github.com/kaltura/playkit-js-transcript/commit/357f8b53cffe64b0da1152f96c6c54f677142bfb))
12
+ * **FEV-1273:** tiny style changes ([4967668](https://github.com/kaltura/playkit-js-transcript/commit/49676686b24cd36a0881e2f5897c472a7e555b94))
13
+ * **FEV-1346:** style-loader fix ([#99](https://github.com/kaltura/playkit-js-transcript/issues/99)) ([c901bf0](https://github.com/kaltura/playkit-js-transcript/commit/c901bf08054df133274bf2e5fcf8568009a936c6))
6
14
 
7
15
  ### [2.1.4](https://github.com/kaltura/playkit-js-transcript/compare/v2.1.3...v2.1.4) (2022-01-19)
8
16
 
package/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
1
  GNU AFFERO GENERAL PUBLIC LICENSE
2
2
  Version 3, 19 November 2007
3
3
 
4
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
5
  Everyone is permitted to copy and distribute verbatim copies
6
6
  of this license document, but changing it is not allowed.
7
7
 
@@ -633,8 +633,8 @@ the "copyright" line and a pointer to where the full notice is found.
633
633
  Copyright (C) <year> <name of author>
634
634
 
635
635
  This program is free software: you can redistribute it and/or modify
636
- it under the terms of the GNU Affero General Public License as published by
637
- the Free Software Foundation, either version 3 of the License, or
636
+ it under the terms of the GNU Affero General Public License as published
637
+ by the Free Software Foundation, either version 3 of the License, or
638
638
  (at your option) any later version.
639
639
 
640
640
  This program is distributed in the hope that it will be useful,
@@ -643,7 +643,7 @@ the "copyright" line and a pointer to where the full notice is found.
643
643
  GNU Affero General Public License for more details.
644
644
 
645
645
  You should have received a copy of the GNU Affero General Public License
646
- along with this program. If not, see <http://www.gnu.org/licenses/>.
646
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
647
647
 
648
648
  Also add information on how to contact you by electronic and paper mail.
649
649
 
@@ -658,4 +658,4 @@ specific requirements.
658
658
  You should also get your employer (if you work as a programmer) or school,
659
659
  if any, to sign a "copyright disclaimer" for the program, if necessary.
660
660
  For more information on this, and how to apply and follow the GNU AGPL, see
661
- <http://www.gnu.org/licenses/>.
661
+ <https://www.gnu.org/licenses/>.
package/README.md CHANGED
@@ -1,32 +1,130 @@
1
- # Kaltura Player V7 - Transcript plugin
1
+ # PlayKit JS Transcript - plugin for the [PlayKit JS Player]
2
2
 
3
- [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
3
+ PlayKit JS Transcript is written in [ECMAScript6], statically analysed using [Typescript] and transpiled in ECMAScript5 using [Babel].
4
4
 
5
- ## Overview
6
- > this section will be added soon
5
+ [typescript]: https://www.typescriptlang.org/
6
+ [ecmascript6]: https://github.com/ericdouglas/ES6-Learning#articles--tutorials
7
+ [babel]: https://babeljs.io
7
8
 
8
- ## Project structure
9
- > this section will be added soon
9
+ ## Getting Started
10
10
 
11
- ## Plugin configuration
11
+ ### Prerequisites
12
12
 
13
- ### Plugin configuration can be defined as object of properties, ex:
13
+ The plugin requires [Kaltura Player] to be loaded first.
14
+
15
+ [kaltura player]: https://github.com/kaltura/kaltura-player-js
16
+
17
+ ### Installing
18
+
19
+ First, clone and run [yarn] to install dependencies:
20
+
21
+ [yarn]: https://yarnpkg.com/lang/en/
22
+
23
+ ```
24
+ git clone https://github.com/kaltura/playkit-js-transcript.git
25
+ cd playkit-js-transcript
26
+ yarn install
14
27
  ```
15
- 'playkit-js-transcript': {
16
- position: 'right',
17
- printDisabled : true,
18
- expandMode:'over'
19
- }
28
+
29
+ ### Building
30
+
31
+ Then, build the player
32
+
33
+ ```javascript
34
+ yarn run build
20
35
  ```
21
36
 
22
- ### List of available configuration properties:
23
- Parameter | Description | Type | Default
24
- --- | --- | :-----: | :-----:
25
- expandMode | Set player area for TW | `"alongside" | "over"` | `"alongside"`
26
- expandOnFirstPlay | Opens plugin on automatically | `boolean` | `true`
27
- showTime | Show or hide caption time | `boolean` | `true`
28
- position | Position of TW plugin | `"right" | "bottom"` | `"bottom"`
29
- searchDebounceTimeout | Debounce on caption search | `number` | `250`
30
- searchNextPrevDebounceTimeout | Debounce on jump to prev\next search result | `number` | `100`
31
- downloadDisabled | Disable download of transcript | `boolean` | `false`
32
- printDisabled | Disable print of transcript | `boolean` | `false`
37
+ ### Embed the library in your test page
38
+
39
+ Finally, add the bundle as a script tag in your page, and initialize the player
40
+
41
+ ```html
42
+ <script type="text/javascript" src="/PATH/TO/FILE/kaltura-player.js"></script>
43
+ <!--Kaltura player-->
44
+ <script type="text/javascript" src="/PATH/TO/FILE/playkit-transcript.js"></script>
45
+ <!--PlayKit transcript plugin-->
46
+ <div id="player-placeholder" style="height:360px; width:640px">
47
+ <script type="text/javascript">
48
+ var playerContainer = document.querySelector("#player-placeholder");
49
+ var config = {
50
+ ...
51
+ targetId: 'player-placeholder',
52
+ plugins: {
53
+ transcript: { ... },
54
+ kalturaCuepoints: {}
55
+ }
56
+ ...
57
+ };
58
+ var player = KalturaPlayer.setup(config);
59
+ player.loadMedia(...);
60
+ </script>
61
+ </div>
62
+ ```
63
+
64
+ ## Documentation
65
+
66
+ TBD
67
+
68
+ ## Running the tests
69
+
70
+ Tests can be run locally via [Karma], which will run on Chrome, Firefox and Safari
71
+
72
+ [karma]: https://karma-runner.github.io/1.0/index.html
73
+
74
+ ```
75
+ yarn run test
76
+ ```
77
+
78
+ You can test individual browsers:
79
+
80
+ ```
81
+ yarn run test:chrome
82
+ yarn run test:firefox
83
+ yarn run test:safari
84
+ ```
85
+
86
+ ### And coding style tests
87
+
88
+ We use ESLint [recommended set](http://eslint.org/docs/rules/) with some additions for enforcing [Flow] types and other rules.
89
+
90
+ See [ESLint config](.eslintrc.json) for full configuration.
91
+
92
+ We also use [.editorconfig](.editorconfig) to maintain consistent coding styles and settings, please make sure you comply with the styling.
93
+
94
+ ## Compatibility
95
+
96
+ TBD
97
+
98
+ ## Contributing
99
+
100
+ Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.
101
+
102
+ ## Versioning
103
+
104
+ We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/kaltura/playkit-js-transcript/tags).
105
+
106
+ ## License
107
+
108
+ This project is licensed under the AGPL-3.0 License - see the [LICENSE.md](LICENSE.md) file for details
109
+
110
+ ## Commands
111
+
112
+ Run dev server: `npm run serve`;<br/>
113
+ Update contrib: `npm run infra:latest`;<br/>
114
+ Bump version: `npm run deploy:prepare`;<br/>
115
+
116
+ ## Configuration
117
+
118
+ Plugin configuration:<br/> > `expandOnFirstPlay`: boolean - if plugin should automatically opens on first play (default true);<br/> > `forceChaptersThumb`: boolean - force to use chapters thumbnails (default false);<br/> > `expandMode`: string - expand mode of kitchensink (AlongSideTheVideo|OverTheVideo, default "AlongSideTheVideo");<br/> > `userRole`: string - use session userId as identificator of user (anonymousRole|unmoderatedAdminRole, default "anonymousRole");<br/> > `itemsOrder`: object< string, number > - define order of Tabs (min value at the left) and Items inside group (min value at the top).<br/> itemsOrder also uses as tabs filter (all items that not included in "itemsOrder" object will be filtered out) (default:
119
+ ` { "All": 0, "Chapter": 1, "Slide": 2, "Hotspot": 3, "AnswerOnAir": 4, } ); `
120
+
121
+ ## Troubleshooting
122
+
123
+ ### Dev env
124
+
125
+ Node version: up to 14.18.1<br/>
126
+ If nvm installed: `nvm use` change version of current terminal to required.<br/>
127
+
128
+ ### ARM Architecture support
129
+
130
+ Install dependencies with `npm install --target_arch=x64` set target arch for running it through Rosetta (requires Rosetta installation).<br/>