@latest-thinking/lt-player 1.1.0-s → 1.1.0-u
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/ README.md +1 -0
- package/dist/css/lt-player-main.css +1 -1
- package/dist/css/lt-player-main.css.map +1 -1
- package/dist/js/lt-player-main.js +1 -1
- package/dist/js/lt-player-main.js.map +1 -1
- package/examples/lt-page-with-player.html +3529 -0
- package/examples/lt-page-with-player_files/Weiskopf_Coverphoto.jpg +0 -0
- package/examples/lt-page-with-player_files/ajax-progress.module.css +49 -0
- package/examples/lt-page-with-player_files/align.module.css +32 -0
- package/examples/lt-page-with-player_files/announce.js +49 -0
- package/examples/lt-page-with-player_files/autocomplete-loading.module.css +22 -0
- package/examples/lt-page-with-player_files/autocomplete.css +16 -0
- package/examples/lt-page-with-player_files/bootstrap.css +22691 -0
- package/examples/lt-page-with-player_files/clearfix.module.css +15 -0
- package/examples/lt-page-with-player_files/container-inline.module.css +16 -0
- package/examples/lt-page-with-player_files/cookiesjsr.min.css +10 -0
- package/examples/lt-page-with-player_files/core.css +97 -0
- package/examples/lt-page-with-player_files/details.module.css +10 -0
- package/examples/lt-page-with-player_files/fieldgroup.module.css +9 -0
- package/examples/lt-page-with-player_files/hidden.module.css +53 -0
- package/examples/lt-page-with-player_files/himme-alexander-beyond_0.jpg +0 -0
- package/examples/lt-page-with-player_files/item-list.module.css +19 -0
- package/examples/lt-page-with-player_files/js.module.css +22 -0
- package/examples/lt-page-with-player_files/latest_thinking.style.css +6496 -0
- package/examples/lt-page-with-player_files/logo-small.png +0 -0
- package/examples/lt-page-with-player_files/lt-player.css +3795 -0
- package/examples/lt-page-with-player_files/menu.css +64 -0
- package/examples/lt-page-with-player_files/nowrap.module.css +8 -0
- package/examples/lt-page-with-player_files/paragraphs.unpublished.css +3 -0
- package/examples/lt-page-with-player_files/position-container.module.css +8 -0
- package/examples/lt-page-with-player_files/progress.module.css +51 -0
- package/examples/lt-page-with-player_files/radix.style.css +1 -0
- package/examples/lt-page-with-player_files/reset-appearance.module.css +15 -0
- package/examples/lt-page-with-player_files/resize.module.css +21 -0
- package/examples/lt-page-with-player_files/search_api_autocomplete.css +41 -0
- package/examples/lt-page-with-player_files/sticky-header.module.css +13 -0
- package/examples/lt-page-with-player_files/system-status-counter.css +30 -0
- package/examples/lt-page-with-player_files/system-status-report-counters.css +27 -0
- package/examples/lt-page-with-player_files/system-status-report-general-info.css +14 -0
- package/examples/lt-page-with-player_files/tabledrag.module.css +98 -0
- package/examples/lt-page-with-player_files/tablesort.module.css +19 -0
- package/examples/lt-page-with-player_files/theme.css +446 -0
- package/examples/lt-page-with-player_files/thumbnail_MPI_CBS_Eingangsbereich.jpg +0 -0
- package/examples/lt-page-with-player_files/tree-child.module.css +18 -0
- package/examples/lt-page-with-player_files/widget-min.js +10 -0
- package/examples/portrait-with-subtitles.html +1 -0
- package/package.json +1 -1
- package/src/assets/sass/abstracts/_variables.scss +1 -1
- package/src/assets/sass/components/_all.scss +1 -1
- package/src/assets/sass/components/_loader.scss +70 -0
- package/src/assets/sass/core/_player.scss +3 -1
- package/src/assets/sass/sections/_additional-info.scss +1 -1
- package/src/assets/sass/sections/_settings.scss +1 -1
- package/src/assets/sass/sections/_subtitles.scss +50 -11
- package/src/assets/sass/sections/controllers/_botom.scss +43 -20
- package/src/assets/sass/sections/controllers/_notification-rewind-forward.scss +12 -1
- package/src/components/LTPlayerStatusFeedback.ts +68 -0
- package/src/components/captions/LTPlayerCaptions.ts +25 -1
- package/src/components/config/LTPlayerConfig.ts +9 -0
- package/src/components/controls/LTPlayerControlsEvents.ts +63 -58
- package/src/components/controls/settings/LTPlayerCommonSettingsControllers.ts +7 -1
- package/src/components/controls/settings/LTPlayerDesktopSettingsControllers.ts +4 -5
- package/src/components/controls/settings/LTPlayerMobileSettingsControllers.ts +40 -44
- package/src/components/events/LTPlayerCommon.ts +32 -0
- package/src/components/events/LTPlayerDesktop.ts +8 -12
- package/src/components/events/LTPlayerMobile.ts +8 -11
- package/src/global/controllers/LTPlayerController.ts +5 -1
- package/src/services/Helper.ts +5 -1
- package/src/services/TemplateService.ts +5 -0
- package/src/views/settings.handlebars +1 -1
- package/src/views/settings.mobile.handlebars +20 -0
- package/src/views/template.handlebars +3 -0
- package/src/assets/sass/components/_spinner.scss +0 -46
|
@@ -9,23 +9,24 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.lt-player-custom-captions {
|
|
12
|
-
|
|
12
|
+
display: inline-block;
|
|
13
|
+
background-color: rgba($default_color_player, 0.8);
|
|
14
|
+
margin: 0 $lt-player-padding-xxl / 2 16px $lt-player-padding-xxl / 2;
|
|
15
|
+
padding: 8px 12px;
|
|
16
|
+
|
|
17
|
+
&:is(:not(span)) {
|
|
18
|
+
padding: 0;
|
|
19
|
+
}
|
|
13
20
|
|
|
14
21
|
span {
|
|
15
|
-
|
|
16
|
-
justify-content: center;
|
|
17
|
-
margin: auto;
|
|
18
|
-
width: 100%;
|
|
19
|
-
color: $default-lt-player-black;
|
|
20
|
-
background-color: rgba(216, 216, 70, 0.7);
|
|
22
|
+
font-family: $lt-font-family-base;
|
|
21
23
|
font-size: $lt-player-font-size-lg;
|
|
22
24
|
line-height: $lt-player-line-height;
|
|
23
25
|
font-weight: $lt-player-font-weight-md;
|
|
24
|
-
|
|
25
|
-
border-radius: 40px;
|
|
26
|
-
font-family: "MuseoSans", sans-serif;
|
|
26
|
+
color: $default-lt-player-black;
|
|
27
27
|
white-space: unset;
|
|
28
28
|
box-decoration-break: clone;
|
|
29
|
+
padding: 0 16px;
|
|
29
30
|
|
|
30
31
|
&:empty {
|
|
31
32
|
padding: 0;
|
|
@@ -33,10 +34,48 @@
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
.lt-player-orientation--portrait {
|
|
38
|
+
.lt-player-custom-captions {
|
|
39
|
+
margin: 0 0 16px 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.lt-player-orientation--landscape {
|
|
44
|
+
.lt-player-custom-captions {
|
|
45
|
+
span {
|
|
46
|
+
font-size: $lt-player-font-size-sm;
|
|
47
|
+
border-radius: 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.lt-state-controls-visible {
|
|
52
|
+
.lt-player-custom-captions {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
36
58
|
@container portrait (width < 319px) {
|
|
37
59
|
.lt-player-custom-captions {
|
|
38
60
|
span {
|
|
39
61
|
font-size: $lt-player-font-size-sm;
|
|
40
62
|
}
|
|
41
63
|
}
|
|
42
|
-
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@container landscape (width > 639px) {
|
|
67
|
+
.lt-player-orientation--landscape {
|
|
68
|
+
.lt-player-custom-captions {
|
|
69
|
+
span {
|
|
70
|
+
font-size: $lt-player-font-size-lg;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.lt-state-controls-visible {
|
|
75
|
+
.lt-player-custom-captions {
|
|
76
|
+
margin: 0 $lt-player-padding-xxl 16px $lt-player-padding-xxl;
|
|
77
|
+
display: inline-block;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
bottom: 0;
|
|
118
118
|
height: 40%;
|
|
119
119
|
background: var(--plyr-video-controls-background,linear-gradient(transparent,rgba(0,0,0,.75)));
|
|
120
|
-
|
|
120
|
+
z-index: -1;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
&__volume_control {
|
|
@@ -311,6 +311,32 @@
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
+
.lt-player-orientation--landscape {
|
|
315
|
+
.plyr {
|
|
316
|
+
&__progress {
|
|
317
|
+
&--wrapper {
|
|
318
|
+
padding: 0 $lt-player-padding-xxl / 2;
|
|
319
|
+
|
|
320
|
+
.bottom-controller__current {
|
|
321
|
+
display: none;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
&__controls {
|
|
327
|
+
.bottom-controller {
|
|
328
|
+
padding: 0 $lt-player-padding-xxl / 2 15px $lt-player-padding-xxl / 2;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&:not(.lt-state-controls-visible) {
|
|
334
|
+
.bottom-controller__background {
|
|
335
|
+
display: none;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
314
340
|
// @Container Query
|
|
315
341
|
|
|
316
342
|
@container portrait (width > 319px) {
|
|
@@ -367,13 +393,17 @@
|
|
|
367
393
|
.plyr {
|
|
368
394
|
&__progress {
|
|
369
395
|
&--wrapper {
|
|
370
|
-
padding: 0
|
|
396
|
+
padding: 0 $lt-player-padding-xxl / 2;
|
|
397
|
+
|
|
398
|
+
.bottom-controller__current {
|
|
399
|
+
display: flex;
|
|
400
|
+
}
|
|
371
401
|
}
|
|
372
402
|
}
|
|
373
403
|
|
|
374
404
|
&__controls {
|
|
375
405
|
.bottom-controller {
|
|
376
|
-
padding: 25px
|
|
406
|
+
padding: 0 $lt-player-padding-xxl / 2 25px $lt-player-padding-xxl / 2;
|
|
377
407
|
|
|
378
408
|
&__center-buttons {
|
|
379
409
|
gap: 20px;
|
|
@@ -394,13 +424,13 @@
|
|
|
394
424
|
.plyr {
|
|
395
425
|
&__progress {
|
|
396
426
|
&--wrapper {
|
|
397
|
-
padding: 0
|
|
427
|
+
padding: 0 $lt-player-padding-xxl;
|
|
398
428
|
}
|
|
399
429
|
}
|
|
400
430
|
|
|
401
431
|
&__controls {
|
|
402
432
|
.bottom-controller {
|
|
403
|
-
padding: 25px
|
|
433
|
+
padding: 0 $lt-player-padding-xxl 25px $lt-player-padding-xxl;
|
|
404
434
|
|
|
405
435
|
&__left-buttons,
|
|
406
436
|
&__right-buttons {
|
|
@@ -413,7 +443,7 @@
|
|
|
413
443
|
|
|
414
444
|
&__volume_control {
|
|
415
445
|
display: flex;
|
|
416
|
-
left:
|
|
446
|
+
left: 80px;
|
|
417
447
|
}
|
|
418
448
|
|
|
419
449
|
.mini-player-control {
|
|
@@ -430,30 +460,18 @@
|
|
|
430
460
|
}
|
|
431
461
|
}
|
|
432
462
|
|
|
433
|
-
@container landscape (width > 759px) {
|
|
434
|
-
.lt-player-orientation--landscape {
|
|
435
|
-
.plyr {
|
|
436
|
-
&__controls {
|
|
437
|
-
.bottom-controller {
|
|
438
|
-
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
463
|
@container landscape (width > 912px) {
|
|
446
464
|
.lt-player-orientation--landscape {
|
|
447
465
|
.plyr {
|
|
448
466
|
&__progress {
|
|
449
467
|
&--wrapper {
|
|
450
|
-
padding: 0
|
|
468
|
+
padding: 0 $lt-player-padding-xxl;
|
|
451
469
|
}
|
|
452
470
|
}
|
|
453
471
|
|
|
454
472
|
&__controls {
|
|
455
473
|
.bottom-controller {
|
|
456
|
-
padding: 28px
|
|
474
|
+
padding: 0 $lt-player-padding-xxl 28px $lt-player-padding-xxl;
|
|
457
475
|
|
|
458
476
|
&__left-buttons,
|
|
459
477
|
&__right-buttons {
|
|
@@ -464,6 +482,10 @@
|
|
|
464
482
|
gap: 32px;
|
|
465
483
|
}
|
|
466
484
|
|
|
485
|
+
&__volume_control {
|
|
486
|
+
left: 100px;
|
|
487
|
+
}
|
|
488
|
+
|
|
467
489
|
&__next-chapter-view,
|
|
468
490
|
&__previous-chapter-view {
|
|
469
491
|
font-size: $lt-player-font-size-lg2;
|
|
@@ -490,6 +512,7 @@
|
|
|
490
512
|
&__previous-chapter-view,
|
|
491
513
|
&__next-chapter-view {
|
|
492
514
|
display: flex;
|
|
515
|
+
gap: 8px;
|
|
493
516
|
}
|
|
494
517
|
}
|
|
495
518
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
.lt-player-notification {
|
|
4
4
|
width: 100%;
|
|
5
|
-
padding: 20px 20px 28px 20px;
|
|
6
5
|
|
|
7
6
|
&__notification-button-state {
|
|
8
7
|
position: absolute;
|
|
@@ -228,6 +227,18 @@
|
|
|
228
227
|
}
|
|
229
228
|
}
|
|
230
229
|
|
|
230
|
+
.lt-player-orientation--portrait {
|
|
231
|
+
.lt-player-notification {
|
|
232
|
+
padding: 20px 20px 28px 20px;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.lt-player-orientation--landscape {
|
|
237
|
+
.lt-player-notification {
|
|
238
|
+
padding: 0;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
231
242
|
@container portrait (width > 319px) {
|
|
232
243
|
.lt-player-orientation--portrait {
|
|
233
244
|
.lt-player-notification {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {LTPlayerController} from "../global/controllers/LTPlayerController";
|
|
2
|
+
|
|
3
|
+
export class LTPlayerStatusFeedback {
|
|
4
|
+
|
|
5
|
+
player: LTPlayerController
|
|
6
|
+
element: HTMLElement
|
|
7
|
+
|
|
8
|
+
constructor(player: LTPlayerController) {
|
|
9
|
+
this.player = player;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
private getElement(): HTMLElement {
|
|
13
|
+
if (!this.element) {
|
|
14
|
+
if (this.player.playerConfig) {
|
|
15
|
+
this.element = this.player.playerConfig.getPlayerElementContainer()
|
|
16
|
+
} else {
|
|
17
|
+
console.error("Failed to get element from playerConfig")
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return this.element
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
private addClass(name: string) {
|
|
24
|
+
const element = this.getElement()
|
|
25
|
+
if (element && !element.classList.contains(name)) {
|
|
26
|
+
element.classList.add(name)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private removeClass(name: string) {
|
|
31
|
+
const element = this.getElement()
|
|
32
|
+
if (element && element.classList.contains(name)) {
|
|
33
|
+
element.classList.remove(name)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
setLoading() {
|
|
38
|
+
this.addClass("lt-state-loader-active")
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
setLoadingSeek() {
|
|
42
|
+
this.addClass("lt-state-seeking")
|
|
43
|
+
this.setLoading()
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
clearLoading() {
|
|
47
|
+
this.removeClass("lt-state-loader-active")
|
|
48
|
+
this.removeClass("lt-state-seeking")
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
setFullscreen() {
|
|
52
|
+
this.addClass("lt-state-fullscreen")
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
clearFullscreen() {
|
|
56
|
+
this.removeClass("lt-state-fullscreen")
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
setControlsVisible() {
|
|
60
|
+
this.addClass("lt-state-controls-visible")
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
clearControlsVisible() {
|
|
64
|
+
this.removeClass("lt-state-controls-visible")
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -13,7 +13,7 @@ export class LTPlayerCaptionsManager {
|
|
|
13
13
|
const trackElement = videoElement.querySelector("track")
|
|
14
14
|
|
|
15
15
|
this.player.plyr.currentTrack = -1;
|
|
16
|
-
this.
|
|
16
|
+
this.clearSubtitles()
|
|
17
17
|
|
|
18
18
|
if (trackElement) {
|
|
19
19
|
trackElement.remove()
|
|
@@ -37,4 +37,28 @@ export class LTPlayerCaptionsManager {
|
|
|
37
37
|
videoElement.appendChild(newTrack);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
enableCaptions() {
|
|
42
|
+
this.player.playerConfig.setCaptionsEnabled(true)
|
|
43
|
+
this.player.plyr.currentTrack = 0;
|
|
44
|
+
this.player.plyr.toggleCaptions(true)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
disableCaptions() {
|
|
48
|
+
this.player.playerConfig.setCaptionsEnabled(false)
|
|
49
|
+
this.player.plyr.currentTrack = -1;
|
|
50
|
+
this.player.plyr.toggleCaptions(false)
|
|
51
|
+
this.clearSubtitles()
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
clearSubtitles(): void {
|
|
55
|
+
const controls = this.player.plyr.elements.controls
|
|
56
|
+
const customSubtitlesElement = controls.querySelector('.lt-player-custom-captions');
|
|
57
|
+
const spanElement = customSubtitlesElement.querySelector('span');
|
|
58
|
+
|
|
59
|
+
if (!spanElement) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
spanElement.innerHTML = ''; // Clear previous captions
|
|
63
|
+
}
|
|
40
64
|
}
|
|
@@ -31,6 +31,7 @@ export class LTPlayerConfig {
|
|
|
31
31
|
'playsinline': true,
|
|
32
32
|
},
|
|
33
33
|
defaultConfig : false,
|
|
34
|
+
captionsEnabled: false,
|
|
34
35
|
share: null,
|
|
35
36
|
chapters : null,
|
|
36
37
|
playerType: null,
|
|
@@ -262,5 +263,13 @@ export class LTPlayerConfig {
|
|
|
262
263
|
getEmbed() {
|
|
263
264
|
return this.configData.embed;
|
|
264
265
|
}
|
|
266
|
+
|
|
267
|
+
getCaptionsEnabled(): boolean {
|
|
268
|
+
return this.configData.captionsEnabled
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
setCaptionsEnabled(status: boolean) {
|
|
272
|
+
this.configData.captionsEnabled = status
|
|
273
|
+
}
|
|
265
274
|
}
|
|
266
275
|
|
|
@@ -201,55 +201,54 @@ export namespace LTPlayerControlsEvents {
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
if (
|
|
209
|
-
if (
|
|
210
|
-
|
|
211
|
-
textControlsElement.classList.add('lt-player-video-content-enable')
|
|
212
|
-
}
|
|
213
|
-
} else {
|
|
214
|
-
textControlsElement.classList.remove('lt-player-video-content-enable')
|
|
204
|
+
showHideText(visible: boolean, controls: HTMLElement) {
|
|
205
|
+
const textControlsElement = controls.querySelector('.lt-player-video-content');
|
|
206
|
+
|
|
207
|
+
if (textControlsElement) {
|
|
208
|
+
if (visible) {
|
|
209
|
+
if (!textControlsElement.classList.contains('lt-player-video-content-enable')) {
|
|
210
|
+
textControlsElement.classList.add('lt-player-video-content-enable')
|
|
215
211
|
}
|
|
212
|
+
} else {
|
|
213
|
+
textControlsElement.classList.remove('lt-player-video-content-enable')
|
|
216
214
|
}
|
|
217
|
-
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
218
217
|
|
|
219
|
-
|
|
220
|
-
|
|
218
|
+
showHideSeekBar(visible: boolean, controls: HTMLElement) {
|
|
219
|
+
const seekBarControlsElement = controls.querySelector('.plyr__progress--wrapper');
|
|
221
220
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
} else {
|
|
228
|
-
seekBarControlsElement.classList.remove('plyr__progress--wrapper-enable')
|
|
221
|
+
if (seekBarControlsElement) {
|
|
222
|
+
if (visible) {
|
|
223
|
+
if (!seekBarControlsElement.classList.contains('plyr__progress--wrapper-enable')) {
|
|
224
|
+
seekBarControlsElement.classList.add('plyr__progress--wrapper-enable')
|
|
229
225
|
}
|
|
226
|
+
} else {
|
|
227
|
+
seekBarControlsElement.classList.remove('plyr__progress--wrapper-enable')
|
|
230
228
|
}
|
|
231
|
-
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
232
231
|
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
showHideBottomControls(visible: boolean, controls: HTMLElement) {
|
|
233
|
+
const bottomControlsElement = controls.querySelector('.bottom-controller');
|
|
235
234
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
} else {
|
|
242
|
-
bottomControlsElement.classList.remove('bottom-controller-enable')
|
|
235
|
+
if (bottomControlsElement) {
|
|
236
|
+
if (visible) {
|
|
237
|
+
if (!bottomControlsElement.classList.contains('bottom-controller-enable')) {
|
|
238
|
+
bottomControlsElement.classList.add('bottom-controller-enable')
|
|
243
239
|
}
|
|
240
|
+
} else {
|
|
241
|
+
bottomControlsElement.classList.remove('bottom-controller-enable')
|
|
244
242
|
}
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
showHideOnPause(visible: boolean, controls: HTMLElement) {
|
|
248
|
-
this.showHideBottomControls(visible, controls);
|
|
249
|
-
this.showHideSeekBar(visible, controls);
|
|
250
|
-
this.showHideBottomControls(visible, controls);
|
|
251
243
|
}
|
|
252
244
|
}
|
|
245
|
+
|
|
246
|
+
showHideAllControls(visible: boolean, controls: HTMLElement) {
|
|
247
|
+
this.showHideText(visible, controls);
|
|
248
|
+
this.showHideSeekBar(visible, controls);
|
|
249
|
+
this.showHideBottomControls(visible, controls);
|
|
250
|
+
}
|
|
251
|
+
|
|
253
252
|
}
|
|
254
253
|
|
|
255
254
|
export class Desktop {
|
|
@@ -272,11 +271,11 @@ export namespace LTPlayerControlsEvents {
|
|
|
272
271
|
const controls = instance.plyr.elements.controls;
|
|
273
272
|
const commonInstance = this.common;
|
|
274
273
|
controls.classList.add('plyr__controls-enable');
|
|
274
|
+
instance.statusFeedbackService.setControlsVisible()
|
|
275
275
|
|
|
276
|
-
|
|
277
|
-
commonInstance.
|
|
278
|
-
commonInstance.
|
|
279
|
-
commonInstance.showHideControls.showHideBottomControls(true, controls);
|
|
276
|
+
commonInstance.showHideText(true, controls);
|
|
277
|
+
commonInstance.showHideSeekBar(true, controls);
|
|
278
|
+
commonInstance.showHideBottomControls(true, controls);
|
|
280
279
|
|
|
281
280
|
let timerText: NodeJS.Timeout = null;
|
|
282
281
|
let timerSeekBar: NodeJS.Timeout = null;
|
|
@@ -297,20 +296,20 @@ export namespace LTPlayerControlsEvents {
|
|
|
297
296
|
}
|
|
298
297
|
|
|
299
298
|
if (instance.plyr.paused) {
|
|
300
|
-
commonInstance.
|
|
299
|
+
commonInstance.showHideAllControls(true, controls);
|
|
301
300
|
return;
|
|
302
301
|
}
|
|
303
302
|
|
|
304
303
|
if (!instance.playerConfig.isPinTextControls()) {
|
|
305
|
-
commonInstance.
|
|
304
|
+
commonInstance.showHideText(true, controls);
|
|
306
305
|
}
|
|
307
306
|
|
|
308
307
|
if (!instance.playerConfig.isPinSeekBarControls()) {
|
|
309
|
-
commonInstance.
|
|
308
|
+
commonInstance.showHideSeekBar(true, controls);
|
|
310
309
|
}
|
|
311
310
|
|
|
312
311
|
if (!instance.playerConfig.isPinBottomControls()) {
|
|
313
|
-
commonInstance.
|
|
312
|
+
commonInstance.showHideBottomControls(true, controls);
|
|
314
313
|
}
|
|
315
314
|
|
|
316
315
|
})
|
|
@@ -318,25 +317,26 @@ export namespace LTPlayerControlsEvents {
|
|
|
318
317
|
|
|
319
318
|
controls.addEventListener('mouseleave', function () {
|
|
320
319
|
if (instance.plyr.paused) {
|
|
321
|
-
commonInstance.
|
|
320
|
+
commonInstance.showHideAllControls(true, controls);
|
|
322
321
|
return;
|
|
323
322
|
}
|
|
324
323
|
|
|
325
324
|
if (!instance.playerConfig.isPinTextControls()) {
|
|
326
325
|
timerText = setTimeout(() => {
|
|
327
|
-
commonInstance.
|
|
326
|
+
commonInstance.showHideText(false, controls);
|
|
328
327
|
}, 5000)
|
|
329
328
|
}
|
|
330
329
|
|
|
331
330
|
if (!instance.playerConfig.isPinSeekBarControls()) {
|
|
332
331
|
timerSeekBar = setTimeout(() => {
|
|
333
|
-
commonInstance.
|
|
332
|
+
commonInstance.showHideSeekBar(false, controls);
|
|
334
333
|
|
|
335
334
|
}, 5000)
|
|
336
335
|
}
|
|
337
336
|
if (!instance.playerConfig.isPinBottomControls()) {
|
|
338
337
|
timerBottomControls = setTimeout(() => {
|
|
339
|
-
|
|
338
|
+
instance.statusFeedbackService.clearControlsVisible()
|
|
339
|
+
commonInstance.showHideBottomControls(false, controls);
|
|
340
340
|
}, 5000)
|
|
341
341
|
}
|
|
342
342
|
})
|
|
@@ -668,6 +668,8 @@ export namespace LTPlayerControlsEvents {
|
|
|
668
668
|
|
|
669
669
|
let playerControlsBackground = playerContainer.querySelector('.plyr__controls__mobile-background');
|
|
670
670
|
|
|
671
|
+
instance.statusFeedbackService.setControlsVisible()
|
|
672
|
+
|
|
671
673
|
if (playerContainer.classList.contains('plyr--hide-controls')) {
|
|
672
674
|
playerContainer.classList.remove('plyr--hide-controls');
|
|
673
675
|
}
|
|
@@ -688,13 +690,13 @@ export namespace LTPlayerControlsEvents {
|
|
|
688
690
|
clearTimeout(this.controlsTimeOut);
|
|
689
691
|
}
|
|
690
692
|
|
|
691
|
-
commonInstance.
|
|
692
|
-
commonInstance.
|
|
693
|
-
commonInstance.
|
|
693
|
+
commonInstance.showHideText(true, playerControlsContainer);
|
|
694
|
+
commonInstance.showHideSeekBar(true, playerControlsContainer);
|
|
695
|
+
commonInstance.showHideBottomControls(true, playerControlsContainer);
|
|
694
696
|
|
|
695
697
|
|
|
696
698
|
if (instance.plyr.paused) {
|
|
697
|
-
commonInstance.
|
|
699
|
+
commonInstance.showHideAllControls(true, playerControlsContainer);
|
|
698
700
|
return;
|
|
699
701
|
}
|
|
700
702
|
|
|
@@ -709,24 +711,27 @@ export namespace LTPlayerControlsEvents {
|
|
|
709
711
|
let playerControlsBackground = playerContainer.querySelector('.plyr__controls__mobile-background');
|
|
710
712
|
|
|
711
713
|
const showHideControls = () => {
|
|
714
|
+
instance.statusFeedbackService.clearControlsVisible()
|
|
715
|
+
|
|
712
716
|
if (!instance.playerConfig.isPinTextControls()) {
|
|
713
|
-
commonInstance.
|
|
717
|
+
commonInstance.showHideText(false, playerControlsContainer);
|
|
714
718
|
}
|
|
715
719
|
|
|
716
720
|
if (!instance.playerConfig.isPinSeekBarControls()) {
|
|
717
|
-
commonInstance.
|
|
721
|
+
commonInstance.showHideSeekBar(false, playerControlsContainer);
|
|
718
722
|
}
|
|
719
723
|
if (!instance.playerConfig.isPinBottomControls()) {
|
|
720
|
-
commonInstance.
|
|
724
|
+
commonInstance.showHideBottomControls(false, playerControlsContainer);
|
|
721
725
|
}
|
|
722
726
|
}
|
|
723
727
|
|
|
728
|
+
|
|
724
729
|
if (!playerControlsContainer.classList.contains('plyr__controls-enable-addInfo')) {
|
|
725
730
|
|
|
726
731
|
if (now) {
|
|
727
732
|
|
|
728
733
|
if (instance.plyr.paused) {
|
|
729
|
-
commonInstance.
|
|
734
|
+
commonInstance.showHideAllControls(true, playerControlsContainer);
|
|
730
735
|
return;
|
|
731
736
|
}
|
|
732
737
|
|
|
@@ -742,7 +747,7 @@ export namespace LTPlayerControlsEvents {
|
|
|
742
747
|
// playerContainer.classList.add('plyr--hide-controls');
|
|
743
748
|
|
|
744
749
|
if (instance.plyr.paused) {
|
|
745
|
-
commonInstance.
|
|
750
|
+
commonInstance.showHideAllControls(true, playerControlsContainer);
|
|
746
751
|
return;
|
|
747
752
|
}
|
|
748
753
|
|
|
@@ -9,7 +9,13 @@ export class LTPlayerCommonSettingsControllers {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
addSettingsTemplate(string: 'mobile' | 'desktop') {
|
|
12
|
-
const settingsTemplate = this.instance.templateService.getSettings(
|
|
12
|
+
const settingsTemplate = this.instance.templateService.getSettings(
|
|
13
|
+
{
|
|
14
|
+
id : this.instance.playerConfig.getPlayerId(),
|
|
15
|
+
[string] : true,
|
|
16
|
+
captions_enabled: this.instance.playerConfig.getCaptionsEnabled()
|
|
17
|
+
}
|
|
18
|
+
);
|
|
13
19
|
const lastElement = this.instance.plyr.elements.controls.lastElementChild;
|
|
14
20
|
|
|
15
21
|
if (lastElement) {
|
|
@@ -33,18 +33,17 @@ export class LTPlayerDesktopSettingsControllers implements SettingsControlsInter
|
|
|
33
33
|
|
|
34
34
|
const selectors = this.settingsInstance.common.getSelectors();
|
|
35
35
|
|
|
36
|
-
const checkBox = selectors.playerControlsContainer.querySelector(
|
|
36
|
+
const checkBox = selectors.playerControlsContainer.querySelector(`.subtitles-body__input-switch`) as HTMLInputElement;
|
|
37
37
|
|
|
38
38
|
if (checkBox) {
|
|
39
39
|
checkBox.addEventListener('change', () => {
|
|
40
40
|
|
|
41
41
|
if (!checkBox.checked) {
|
|
42
|
-
this.settingsInstance.
|
|
43
|
-
|
|
42
|
+
this.settingsInstance.playerInstance.captionsService.disableCaptions();
|
|
43
|
+
} else {
|
|
44
|
+
this.settingsInstance.playerInstance.captionsService.enableCaptions();
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
this.settingsInstance.player.toggleCaptions(true);
|
|
47
|
-
|
|
48
47
|
})
|
|
49
48
|
}
|
|
50
49
|
}
|