@latest-thinking/lt-player 1.1.0 → 1.2.0-a

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 (98) hide show
  1. package/ README.md +126 -0
  2. package/dist/css/lt-player-main.css +1 -1
  3. package/dist/css/lt-player-main.css.map +1 -1
  4. package/dist/js/lt-player-main.js +1 -1
  5. package/dist/js/lt-player-main.js.map +1 -1
  6. package/examples/basic.html +35 -0
  7. package/examples/lt-page-with-player.html +3529 -0
  8. package/examples/lt-page-with-player_files/Weiskopf_Coverphoto.jpg +0 -0
  9. package/examples/lt-page-with-player_files/ajax-progress.module.css +49 -0
  10. package/examples/lt-page-with-player_files/align.module.css +32 -0
  11. package/examples/lt-page-with-player_files/announce.js +49 -0
  12. package/examples/lt-page-with-player_files/autocomplete-loading.module.css +22 -0
  13. package/examples/lt-page-with-player_files/autocomplete.css +16 -0
  14. package/examples/lt-page-with-player_files/bootstrap.css +22691 -0
  15. package/examples/lt-page-with-player_files/clearfix.module.css +15 -0
  16. package/examples/lt-page-with-player_files/container-inline.module.css +16 -0
  17. package/examples/lt-page-with-player_files/cookiesjsr.min.css +10 -0
  18. package/examples/lt-page-with-player_files/core.css +97 -0
  19. package/examples/lt-page-with-player_files/details.module.css +10 -0
  20. package/examples/lt-page-with-player_files/fieldgroup.module.css +9 -0
  21. package/examples/lt-page-with-player_files/hidden.module.css +53 -0
  22. package/examples/lt-page-with-player_files/himme-alexander-beyond_0.jpg +0 -0
  23. package/examples/lt-page-with-player_files/item-list.module.css +19 -0
  24. package/examples/lt-page-with-player_files/js.module.css +22 -0
  25. package/examples/lt-page-with-player_files/latest_thinking.style.css +6496 -0
  26. package/examples/lt-page-with-player_files/logo-small.png +0 -0
  27. package/examples/lt-page-with-player_files/menu.css +64 -0
  28. package/examples/lt-page-with-player_files/nowrap.module.css +8 -0
  29. package/examples/lt-page-with-player_files/paragraphs.unpublished.css +3 -0
  30. package/examples/lt-page-with-player_files/position-container.module.css +8 -0
  31. package/examples/lt-page-with-player_files/progress.module.css +51 -0
  32. package/examples/lt-page-with-player_files/radix.style.css +1 -0
  33. package/examples/lt-page-with-player_files/reset-appearance.module.css +15 -0
  34. package/examples/lt-page-with-player_files/resize.module.css +21 -0
  35. package/examples/lt-page-with-player_files/search_api_autocomplete.css +41 -0
  36. package/examples/lt-page-with-player_files/sticky-header.module.css +13 -0
  37. package/examples/lt-page-with-player_files/system-status-counter.css +30 -0
  38. package/examples/lt-page-with-player_files/system-status-report-counters.css +27 -0
  39. package/examples/lt-page-with-player_files/system-status-report-general-info.css +14 -0
  40. package/examples/lt-page-with-player_files/tabledrag.module.css +98 -0
  41. package/examples/lt-page-with-player_files/tablesort.module.css +19 -0
  42. package/examples/lt-page-with-player_files/theme.css +446 -0
  43. package/examples/lt-page-with-player_files/thumbnail_MPI_CBS_Eingangsbereich.jpg +0 -0
  44. package/examples/lt-page-with-player_files/tree-child.module.css +18 -0
  45. package/examples/lt-page-with-player_files/widget-min.js +10 -0
  46. package/examples/lt-website.html +76 -0
  47. package/examples/portrait-with-subtitles.html +81 -0
  48. package/examples/samples/vtt/Pahl-Kerstin-Maria-MAIN-20230320.vtt +765 -0
  49. package/examples/samples/vtt/Sobolev-Anton-Subtitles-20230518_0.vtt +352 -0
  50. package/examples/samples/vtt/demo.vtt +7 -0
  51. package/package.json +1 -1
  52. package/src/assets/sass/abstracts/_mixins.scss +1 -1
  53. package/src/assets/sass/abstracts/_variables.scss +1 -1
  54. package/src/assets/sass/app.scss +19 -0
  55. package/src/assets/sass/components/_all.scss +1 -1
  56. package/src/assets/sass/components/_loader.scss +187 -0
  57. package/src/assets/sass/components/_modal.scss +6 -0
  58. package/src/assets/sass/core/_player.scss +23 -5
  59. package/src/assets/sass/sections/_additional-info.scss +1 -1
  60. package/src/assets/sass/sections/_control.scss +0 -1
  61. package/src/assets/sass/sections/_poster.scss +1 -0
  62. package/src/assets/sass/sections/_settings.scss +36 -53
  63. package/src/assets/sass/sections/_subtitles.scss +78 -23
  64. package/src/assets/sass/sections/controllers/_botom.scss +59 -36
  65. package/src/assets/sass/sections/controllers/_notification-rewind-forward.scss +29 -14
  66. package/src/assets/sass/sections/controllers/_top.scss +1 -1
  67. package/src/components/LTPlayerDevMethode.ts +106 -84
  68. package/src/components/LTPlayerManager.ts +16 -0
  69. package/src/components/LTPlayerSettingsManager.ts +117 -0
  70. package/src/components/LTPlayerSetup.ts +3 -10
  71. package/src/components/LTPlayerStatusFeedback.ts +76 -0
  72. package/src/components/LTPlayerStorage.ts +58 -0
  73. package/src/components/LTPlayerType.ts +10 -2
  74. package/src/components/LTPlayerUpdate.ts +61 -0
  75. package/src/components/captions/LTPlayerCaptions.ts +80 -0
  76. package/src/components/config/LTPlayerConfig.ts +43 -0
  77. package/src/components/config/LTPlayerConfigProcessor.ts +110 -56
  78. package/src/components/controls/LTPlayerChapters.ts +8 -4
  79. package/src/components/controls/LTPlayerControls.ts +2 -0
  80. package/src/components/controls/LTPlayerControlsEvents.ts +200 -49
  81. package/src/components/controls/settings/LTPlayerCommonSettingsControllers.ts +9 -1
  82. package/src/components/controls/settings/LTPlayerDesktopSettingsControllers.ts +17 -14
  83. package/src/components/controls/settings/LTPlayerMobileSettingsControllers.ts +50 -44
  84. package/src/components/events/LTPlayer.ts +24 -21
  85. package/src/components/events/LTPlayerCommon.ts +94 -20
  86. package/src/components/events/LTPlayerDesktop.ts +21 -7
  87. package/src/components/events/LTPlayerMobile.ts +22 -10
  88. package/src/global/controllers/LTPlayerController.ts +7 -0
  89. package/src/services/Helper.ts +6 -1
  90. package/src/services/ResizeService.ts +35 -30
  91. package/src/services/TemplateService.ts +7 -0
  92. package/src/views/additionalInfo.handlebars +18 -18
  93. package/src/views/controls.handlebars +14 -3
  94. package/src/views/poster.handlebars +2 -2
  95. package/src/views/settings.handlebars +1 -1
  96. package/src/views/settings.mobile.handlebars +22 -0
  97. package/src/views/template.handlebars +4 -1
  98. package/src/assets/sass/components/_spinner.scss +0 -46
package/ README.md CHANGED
@@ -141,4 +141,130 @@ You can instantiate by javascript object config. See examples:
141
141
  })
142
142
  </script>
143
143
  ```
144
+ # Multiple captions - support for multiple caption tracks
144
145
 
146
+ ### HTML5 Video config
147
+
148
+ | Option | Type | Default | Description |
149
+ | -------------------- | -------------------------- |----------------------------------------------------------------------------------------------------------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
150
+ | `captions` | Object | `{ active: true, language: 'auto', update: true, label="", url="" srclang="" default=boolean }` | `active`: Toggles if captions should be active by default. `language`: Sets the default language to load (if available). 'auto' uses the browser language. `update`: Listen to changes to tracks and update menu. This is needed for some streaming libraries, but can result in non-selectable language options). |
151
+
152
+ HTML5 only
153
+
154
+ ### The `.source` setter
155
+
156
+ This allows changing the player source and type on the fly.
157
+
158
+ Video example:
159
+
160
+ ```js
161
+ player.source = {
162
+ tracks: [
163
+ {
164
+ kind: 'captions',
165
+ label: 'English',
166
+ srclang: 'en',
167
+ src: '/path/to/captions.en.vtt',
168
+ default: true,
169
+ },
170
+ {
171
+ kind: 'captions',
172
+ label: 'French',
173
+ srclang: 'fr',
174
+ src: '/path/to/captions.fr.vtt',
175
+ },
176
+ ],
177
+ };
178
+ ```
179
+ ## Methods
180
+
181
+ Example method use:
182
+
183
+ ```js
184
+ player.toggleCaptions(toggle);
185
+ ```
186
+
187
+
188
+ ## Example player config
189
+ ```json
190
+ {
191
+ "version": 2,
192
+ "body": {
193
+ "pinText" : true,
194
+ "pinSeekBar" : false,
195
+ "pinControls" : false,
196
+ "embed": false,
197
+ "playerType": "portrait",
198
+ "chapters": [
199
+ {
200
+ "name": "Capitol 1",
201
+ "timestamp": "10"
202
+ },
203
+ {
204
+ "name": "Capitol 2",
205
+ "timestamp": "15"
206
+ },
207
+ {
208
+ "name": "Capitol 3",
209
+ "timestamp": "17"
210
+ }
211
+ ],
212
+ "defaultConfig": {
213
+ "captions": {
214
+ "active": false,
215
+ "language": "en",
216
+ "update": true,
217
+ "label": "asdfasdfasdf",
218
+ "url": "/lt-player/examples/samples/vtt/Pahl-Kerstin-Maria-MAIN-20230320.vtt",
219
+ "srclang": "en"
220
+ }
221
+ },
222
+ "captionsEnabled": false,
223
+ "videoTitle": "Maja Adena",
224
+ "posterImage": "https://web.lt.dev.welink.sh/sites/default/files/2023-09/Video%201.00_00_00_00.Standbild001.jpg",
225
+ "videoParagraph": "What Are Some Unintended Consequences of Pension Reform?",
226
+ "videoUrl": "https://player.vimeo.com/external/837554695.m3u8?s=0c690ee7961cdfabf925774a536d2376e155d7fe",
227
+ "tracks": "https://web.lt.dev.welink.sh/sites/default/files/video-short/subtitles/Pahl-Kerstin-Maria-MAIN-20230320.vtt",
228
+ "fullscreenDisabled": true,
229
+ "share": {
230
+ "canonicalUrl": "http://stg.lt.org/publication/what-are-economic-consequences-international-migration",
231
+ "embedUrl": "https://stg.lt.org/embed/2892",
232
+ "title": "What Are the Economic Consequences of International Migration?"
233
+ },
234
+ "additionalInfo": {
235
+ "bio": {
236
+ "title": "Bio",
237
+ "description": "Maja Adena is a Postdoctoral Researcher in economics. She received her PhD from the Free University Berlin, where she worked as a research fellow until 2012. Ever since, Adena worked with the Social Science Research Centre Berlin (WZB), where she acts not only as a researcher, but also as a member of the academic council. \n\nAdena’s research interests reach from applied microeconomics to political economy and behavioural economics with a more specific interest in the economy of non-profit and charitable organisations."
238
+ },
239
+ "institution": {
240
+ "title": "Institution",
241
+ "institutionName": "Florida State University",
242
+ "image": "https://web.lt.dev.welink.sh/sites/default/files/institution/florida-state-university_cover.jpg",
243
+ "description": "Florida State University preserves, expands, and disseminates knowledge in the sciences, technology, arts, humanities, and professions, while embracing a philosophy of learning strongly rooted in the traditions of the liberal arts. The university is dedicated to excellence in teaching, research, creative endeavors, and service. The university strives to instill the strength, skill, and character essential for lifelong learning, personal responsibility, and sustained achievement within a community that fosters free inquiry and embraces diversity."
244
+ }
245
+ },
246
+ "playerContainer": "PLAYER1",
247
+ "preload": {
248
+ "start": 5,
249
+ "stop": 10,
250
+ "autoType": true,
251
+ "isActive": true
252
+ },
253
+ "autoPlay": true,
254
+ "fullscreenDisabled": true,
255
+ "vimeo": {
256
+ "controls": false,
257
+ "active": false,
258
+ "gesture": "media",
259
+ "transparent": true,
260
+ "speed": true,
261
+ "portrait": true,
262
+ "keyboard": false,
263
+ "title": false,
264
+ "byline": false,
265
+ "playsinline": true,
266
+ "background": true
267
+ }
268
+ }
269
+ }
270
+ ```