@latest-thinking/lt-player 1.0.6 → 1.0.7

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 (40) hide show
  1. package/dist/css/lt-player-main.css +1 -1
  2. package/dist/css/lt-player-main.css.map +1 -1
  3. package/dist/js/lt-player-main.js +1 -1
  4. package/dist/js/lt-player-main.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/assets/sass/abstracts/_mixins.scss +11 -0
  7. package/src/assets/sass/abstracts/_variables.scss +3 -0
  8. package/src/assets/sass/app.scss +13 -1
  9. package/src/assets/sass/components/_modal.scss +1 -1
  10. package/src/assets/sass/sections/_settings.scss +255 -82
  11. package/src/assets/sass/sections/_share.scss +132 -21
  12. package/src/assets/sass/sections/controllers/_botom.scss +296 -303
  13. package/src/assets/sass/sections/controllers/_notification-rewind-forward.scss +36 -66
  14. package/src/assets/sass/sections/controllers/_top.scss +94 -113
  15. package/src/components/LTPlayerSetup.ts +0 -1
  16. package/src/components/LTPlayerType.ts +12 -12
  17. package/src/components/addInfo/LTPlayerAddInfoDesktop.ts +99 -0
  18. package/src/components/addInfo/LTPlayerAddInfoManager.ts +6 -6
  19. package/src/components/addInfo/LTPlayerAddInfoMobile.ts +110 -0
  20. package/src/components/config/LTPlayerConfig.ts +25 -11
  21. package/src/components/controls/LTPlayerControlsEvents.ts +46 -36
  22. package/src/components/controls/settings/LTPlayerDesktopSettingsControllers.ts +0 -1
  23. package/src/components/controls/settings/LTPlayerMobileSettingsControllers.ts +166 -30
  24. package/src/components/events/LTPlayer.ts +8 -0
  25. package/src/components/events/LTPlayerCommon.ts +28 -32
  26. package/src/components/events/LTPlayerDesktop.ts +4 -0
  27. package/src/components/events/LTPlayerMobile.ts +4 -2
  28. package/src/components/share/LTPlayerShareDesktop.ts +120 -0
  29. package/src/components/share/LTPlayerShareEvents.ts +30 -132
  30. package/src/components/share/{LTPlayerShare.ts → LTPlayerShareManager.ts} +26 -8
  31. package/src/components/share/LTPlayerShareMobile.ts +154 -0
  32. package/src/components/video/LTPlayerVideo.ts +49 -0
  33. package/src/global/controllers/LTPlayerController.ts +6 -3
  34. package/src/index.ts +6 -0
  35. package/src/services/ResizeService.ts +7 -7
  36. package/src/views/additionalInfo.handlebars +4 -8
  37. package/src/views/controls.handlebars +41 -37
  38. package/src/views/settings.handlebars +11 -14
  39. package/src/views/share.handlebars +36 -33
  40. package/src/components/addInfo/LTPlayerAdditionalInfoEvents.ts +0 -247
@@ -1,291 +1,14 @@
1
1
  @import "../../abstracts/variables";
2
2
 
3
- .lt-player-landscape--desktop,
4
- .lt-player-landscape--mobile {
5
- .plyr {
6
- &__controls {
7
- .bottom-controller {
8
- max-width: 100%;
9
- padding: 28px 40px;
10
-
11
- .play-button {
12
- padding: 16px;
13
- bottom: -5px;
14
- }
15
-
16
- &__left-buttons,
17
- &__center-buttons,
18
- &__right-buttons {
19
- display: flex;
20
- gap: 20px;
21
- align-items: flex-end;
22
- }
23
-
24
- &__left-buttons {
25
- margin-right: auto;
26
- display: flex;
27
- grid-template-columns: 1fr 1fr;
28
- flex: 1;
29
- }
30
-
31
- &__center-buttons {
32
- gap: 32px;
33
- }
34
-
35
- &__right-buttons {
36
- margin-left: auto;
37
- display: flex;
38
- flex: 1;
39
- justify-content: end;
40
- }
41
-
42
- &__previous-chapter-view-wrapper,
43
- &__next-chapter-view-wrapper {
44
- display: flex;
45
- gap: 16px;
46
- align-items: flex-end;
47
- }
48
-
49
- &__previous-chapter-view {
50
- justify-content: flex-end;
51
- }
52
-
53
- &__next-chapter-view {
54
- justify-content: flex-start;
55
- }
56
-
57
- &__next-chapter-view,
58
- &__previous-chapter-view {
59
- display: flex;
60
- align-items: flex-end;
61
- margin-bottom: 4px;
62
- width: 100px;
63
- font-size: $lt-player-font-size-lg;
64
- color: $default-lt-player-white !important;
65
- }
66
-
67
- &__volume_control {
68
- margin-right: auto;
69
- }
70
- }
71
-
72
- .mini-player-control {
73
- margin-left: auto;
74
- }
75
- }
76
- }
77
-
78
- &.lt-player--landscape {
79
- &__lg {
80
- .plyr {
81
- &__controls {
82
- .bottom-controller {
83
- &__previous-chapter-view {
84
- display: none;
85
- }
86
-
87
- &__next-chapter-view {
88
- display: none;
89
- }
90
- }
91
- }
92
- }
93
- }
94
-
95
- &__md {
96
- .plyr {
97
- &__controls {
98
- .bottom-controller {
99
- &__previous-chapter-view {
100
- display: none;
101
- }
102
-
103
- &__next-chapter-view {
104
- display: none;
105
- }
106
- }
107
- }
108
- }
109
- }
110
-
111
- &__sm {
112
- .plyr {
113
- &__controls {
114
- .bottom-controller {
115
- &__center-buttons {
116
- gap: 20px;
117
- }
118
-
119
- &__previous-chapter-view {
120
- display: none;
121
- }
122
-
123
- &__next-chapter-view {
124
- display: none;
125
- }
126
-
127
- .skip-backward-seconds,
128
- .skip-forward-seconds {
129
- display: flex;
130
- }
131
- }
132
- }
133
- }
134
- }
135
-
136
- &__xs {
137
- .plyr {
138
- &__controls {
139
- .bottom-controller {
140
- .plyr__controls_speed-button {
141
- width: 32px;
142
- height: 32px;
143
- font-size: 10px;
144
- transition: none;
145
- }
146
-
147
- &__left-buttons,
148
- &__center-buttons,
149
- &__right-buttons {
150
- gap: 20px;
151
- }
152
-
153
- &__previous-chapter-view {
154
- display: none;
155
- }
156
-
157
- &__next-chapter-view {
158
- display: none;
159
- }
160
-
161
- .skip-backward-seconds,
162
- .skip-forward-seconds {
163
- display: none;
164
- }
165
- }
166
- }
167
- }
168
- }
169
-
170
- &__xxs {
171
- .plyr {
172
- &__progress {
173
- &--wrapper {
174
- padding: 0 10px;
175
- bottom: 50px;
176
- }
177
- }
178
-
179
- &__controls {
180
- .bottom-controller {
181
- padding: 15px 10px;
182
-
183
- .play-button {
184
- padding: 12px;
185
- }
186
-
187
- .plyr__controls_speed-button {
188
- width: 32px;
189
- height: 32px;
190
- font-size: 10px;
191
- transition: none;
192
- }
193
-
194
- button {
195
- @include buttons-xs;
196
- }
197
-
198
- &__left-buttons,
199
- &__center-buttons,
200
- &__right-buttons {
201
- gap: 16px;
202
- }
203
-
204
- &__center-buttons {
205
- gap: 20px;
206
- }
207
-
208
- &__previous-chapter-view {
209
- display: none;
210
- }
211
-
212
- &__next-chapter-view {
213
- display: none;
214
- }
215
-
216
- .skip-backward-seconds,
217
- .skip-forward-seconds {
218
- display: none;
219
- }
220
- }
221
- }
222
- }
223
- }
224
- }
225
- }
226
-
227
- .lt-player-landscape--desktop {
228
- .plyr {
229
- &__controls {
230
- .bottom-controller {
231
- &__right-buttons {
232
- direction: unset;
233
- }
234
- }
235
- }
236
- }
237
- }
238
-
239
- .lt-player-portrate--mobile,
240
- .lt-player-portrate--desktop {
241
- .plyr {
242
- &__progress {
243
- &--wrapper {
244
- width: 100%;
245
- padding: 0 25px;
246
- position: absolute;
247
- bottom: 90px;
248
- }
249
- }
250
- }
251
-
252
- &.lt-player--portrait {
253
- &__xs {
254
- .plyr {
255
- &__controls {
256
- .bottom-controller {
257
- padding: 16px;
258
-
259
- button {
260
- @include buttons-xs;
261
- }
262
-
263
- .play-button {
264
- padding: 12px;
265
- }
266
-
267
- .plyr__controls_speed-button {
268
- width: 32px;
269
- height: 32px;
270
- font-size: 10px;
271
- transition: none;
272
- }
273
- }
274
- }
275
- }
276
- }
277
- }
278
- }
279
-
280
3
  .plyr {
281
4
  &__progress {
282
5
  z-index: 9;
283
6
 
284
7
  &--wrapper {
285
- width: 100%;
286
- padding: 0 40px;
287
8
  position: absolute;
288
- bottom: 90px;
9
+ width: 100%;
10
+ padding: 0 10px;
11
+ bottom: 50px;
289
12
  }
290
13
  }
291
14
 
@@ -295,35 +18,75 @@
295
18
  bottom: 0;
296
19
  width: 100%;
297
20
  height: 36%;
298
- max-width: 500px;
299
21
  display: flex;
300
22
  justify-content: space-between;
301
23
  align-items: flex-end;
302
- padding: 24px;
24
+ padding: 15px 10px;
25
+ max-width: 100%;
303
26
 
304
27
  button {
305
28
  @extend %lt-player-btn;
306
29
  @include dark-btn;
30
+ @include buttons-xs;
307
31
  z-index: 10;
308
32
  flex: 0 0 auto;
309
33
  }
310
34
 
311
- .plyr__controls_speed-button {
312
- width: 44px;
313
- height: 40px;
314
- white-space: nowrap;
315
- font-size: 12px;
316
- transition: none;
317
- outline: none;
318
- background-color: $default-lt-player-blue;
319
-
320
- &:focus,
321
- &:active,
322
- &:hover,
323
- &:focus-visible {
324
- outline: $default-lt-player-blue;
325
- background-color: $default-lt-player-blue;
326
- }
35
+ &__left-buttons {
36
+ margin-right: auto;
37
+ justify-content: start;
38
+ flex: 1;
39
+ }
40
+
41
+ &__left-buttons,
42
+ &__center-buttons,
43
+ &__right-buttons {
44
+ display: flex;
45
+ gap: 16px;
46
+ align-items: flex-end;
47
+ }
48
+
49
+ &__right-buttons {
50
+ margin-left: auto;
51
+ justify-content: end;
52
+ flex: 1;
53
+ }
54
+
55
+ .skip-backward-seconds,
56
+ .skip-forward-seconds {
57
+ display: none;
58
+ }
59
+
60
+ &__previous-chapter-view-wrapper,
61
+ &__next-chapter-view-wrapper {
62
+ display: flex;
63
+ gap: 16px;
64
+ align-items: center;
65
+ }
66
+
67
+ &__previous-chapter-view,
68
+ &__next-chapter-view {
69
+ display: none;
70
+ }
71
+
72
+ &__previous-chapter-view {
73
+ justify-content: flex-end;
74
+ }
75
+
76
+ &__next-chapter-view {
77
+ justify-content: flex-start;
78
+ }
79
+
80
+ &__next-chapter-view,
81
+ &__previous-chapter-view {
82
+ display: none;
83
+ align-items: flex-end;
84
+ margin-top: 0;
85
+ margin-bottom: 0;
86
+ width: 75px;
87
+ font-size: $lt-player-font-size-sm;
88
+ font-weight: $lt-player-font-weight-sm;
89
+ color: $default-lt-player-white !important;
327
90
  }
328
91
 
329
92
  &__background {
@@ -335,17 +98,21 @@
335
98
  background: var(--plyr-video-controls-background,linear-gradient(transparent,rgba(0,0,0,.75)));
336
99
  }
337
100
 
101
+ &__volume_control {
102
+ display: none;
103
+ }
104
+
105
+ .mini-player-control {
106
+ display: none;
107
+ }
108
+
338
109
  &__play-button_body {
339
110
  position: relative;
340
111
 
341
- &__portrait {
342
- bottom: -8px;
343
- }
344
-
345
112
  .play-button {
346
113
  @extend %lt-player-btn;
347
114
  @include yellow-btn;
348
- padding: 16px;
115
+ bottom: -5px;
349
116
  }
350
117
  }
351
118
 
@@ -473,3 +240,229 @@
473
240
  }
474
241
  }
475
242
  }
243
+
244
+ .lt-player-orientation--portrait {
245
+ .plyr {
246
+ &__progress {
247
+ &--wrapper {
248
+ width: 100%;
249
+ padding: 0 16px;
250
+ position: absolute;
251
+ bottom: 56px;
252
+ }
253
+ }
254
+
255
+ &__controls {
256
+ .bottom-controller {
257
+ padding: 16px;
258
+
259
+ button {
260
+ @include buttons-xs;
261
+ }
262
+
263
+ .play-button {
264
+ padding: 12px;
265
+ }
266
+
267
+ &__left-buttons {
268
+ margin-right: auto;
269
+ flex: 0 0 40px;
270
+ }
271
+
272
+ &__right-buttons {
273
+ margin-left: auto;
274
+ flex: 0 0 40px;
275
+ }
276
+
277
+ &__center-buttons {
278
+ justify-content: center;
279
+ flex: 100;
280
+ gap: 16px;
281
+ }
282
+
283
+ &__volume_control {
284
+ display: flex;
285
+ }
286
+ }
287
+ }
288
+ }
289
+ }
290
+
291
+ // @Container Query
292
+
293
+ @container portrait (width > 319px) {
294
+ .lt-player-orientation--portrait {
295
+ .plyr {
296
+ &__progress {
297
+ &--wrapper {
298
+ padding: 0 20px;
299
+ bottom: 84px;
300
+ }
301
+ }
302
+
303
+ &__controls {
304
+ .bottom-controller {
305
+ padding: 20px 20px 28px 20px;
306
+
307
+ button {
308
+ @include buttons-normal;
309
+ }
310
+
311
+ .play-button {
312
+ padding: 16px;
313
+ }
314
+ }
315
+ }
316
+ }
317
+ }
318
+ }
319
+
320
+ @container portrait (width > 374px) {
321
+ .lt-player-orientation--portrait {
322
+ .plyr {
323
+ &__controls {
324
+ .bottom-controller {
325
+ &__center-buttons {
326
+ gap: 32px;
327
+ }
328
+ }
329
+ }
330
+ }
331
+ }
332
+ }
333
+
334
+ @container landscape (width > 479px) {
335
+ .lt-player-orientation--landscape {
336
+ .plyr {
337
+ &__progress {
338
+ &--wrapper {
339
+ padding: 0 20px;
340
+ bottom: 65px;
341
+ }
342
+ }
343
+
344
+ &__controls {
345
+ .bottom-controller {
346
+ padding: 25px 20px;
347
+
348
+ &__center-buttons {
349
+ gap: 20px;
350
+ }
351
+
352
+ &__previous-chapter-view,
353
+ &__next-chapter-view {
354
+ display: flex;
355
+ }
356
+ }
357
+ }
358
+ }
359
+ }
360
+ }
361
+
362
+ @container landscape (width > 639px) {
363
+ .lt-player-orientation--landscape {
364
+ .plyr {
365
+ &__progress {
366
+ &--wrapper {
367
+ padding: 0 40px;
368
+ }
369
+ }
370
+
371
+ &__controls {
372
+ .bottom-controller {
373
+ padding: 25px 40px;
374
+
375
+ &__left-buttons,
376
+ &__right-buttons {
377
+ gap: 10px;
378
+ }
379
+
380
+ &__center-buttons {
381
+ gap: 16px;
382
+ }
383
+
384
+ &__volume_control {
385
+ display: flex;
386
+ }
387
+
388
+ .mini-player-control {
389
+ display: flex;
390
+ }
391
+
392
+ .skip-backward-seconds,
393
+ .skip-forward-seconds {
394
+ display: flex;
395
+ }
396
+ }
397
+ }
398
+ }
399
+ }
400
+ }
401
+
402
+ @container landscape (width > 759px) {
403
+ .lt-player-orientation--landscape {
404
+ .plyr {
405
+ &__controls {
406
+ .bottom-controller {
407
+
408
+ }
409
+ }
410
+ }
411
+ }
412
+ }
413
+
414
+ @container landscape (width > 912px) {
415
+ .lt-player-orientation--landscape {
416
+ .plyr {
417
+ &__progress {
418
+ &--wrapper {
419
+ padding: 0 40px;
420
+ bottom: 81px;
421
+ }
422
+ }
423
+
424
+ &__controls {
425
+ .bottom-controller {
426
+ padding: 28px 40px;
427
+
428
+ &__left-buttons,
429
+ &__right-buttons {
430
+ gap: 20px;
431
+ }
432
+
433
+ &__center-buttons {
434
+ gap: 32px;
435
+ }
436
+
437
+ &__next-chapter-view,
438
+ &__previous-chapter-view {
439
+ font-size: $lt-player-font-size-lg2;
440
+ }
441
+
442
+ button {
443
+ @include buttons-normal;
444
+ }
445
+
446
+ .play-button {
447
+ padding: 16px;
448
+ }
449
+ }
450
+ }
451
+ }
452
+ }
453
+ }
454
+
455
+ @container landscape (width > 1066px) {
456
+ .lt-player-orientation--landscape {
457
+ .plyr {
458
+ &__controls {
459
+ .bottom-controller {
460
+ &__previous-chapter-view,
461
+ &__next-chapter-view {
462
+ display: flex;
463
+ }
464
+ }
465
+ }
466
+ }
467
+ }
468
+ }