@latest-thinking/lt-player 1.0.5 → 1.0.6

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 (48) hide show
  1. package/.babelrc +2 -1
  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/package.json +5 -3
  7. package/src/assets/sass/abstracts/_mixins.scss +5 -5
  8. package/src/assets/sass/abstracts/_placeholders.scss +5 -5
  9. package/src/assets/sass/abstracts/_variables.scss +7 -7
  10. package/src/assets/sass/components/_modal.scss +61 -19
  11. package/src/assets/sass/sections/_additional-info.scss +6 -6
  12. package/src/assets/sass/sections/_control.scss +12 -11
  13. package/src/assets/sass/sections/_poster.scss +52 -10
  14. package/src/assets/sass/sections/_settings.scss +14 -12
  15. package/src/assets/sass/sections/_share.scss +123 -100
  16. package/src/assets/sass/sections/_subtitles.scss +14 -1
  17. package/src/assets/sass/sections/controllers/_botom.scss +160 -98
  18. package/src/assets/sass/sections/controllers/_mini-player.scss +18 -3
  19. package/src/assets/sass/sections/controllers/_notification-rewind-forward.scss +48 -85
  20. package/src/assets/sass/sections/controllers/_top.scss +39 -13
  21. package/src/components/LTPlayerDevMethode.ts +23 -3
  22. package/src/components/LTPlayerHls.ts +29 -0
  23. package/src/components/LTPlayerSetup.ts +14 -8
  24. package/src/components/LTPlayerType.ts +84 -34
  25. package/src/components/addInfo/LTPlayerAddInfoManager.ts +12 -5
  26. package/src/components/addInfo/LTPlayerAdditionalInfoEvents.ts +37 -12
  27. package/src/components/config/LTPlayerConfig.ts +29 -0
  28. package/src/components/config/LTPlayerConfigProcessor.ts +9 -5
  29. package/src/components/controls/LTPlayerControlsEvents.ts +26 -10
  30. package/src/components/controls/LTPlayerMini.ts +75 -5
  31. package/src/components/controls/settings/LTPlayerDesktopSettingsControllers.ts +2 -2
  32. package/src/components/controls/settings/LTPlayerMobileSettingsControllers.ts +4 -4
  33. package/src/components/events/LTPlayer.ts +10 -1
  34. package/src/components/events/LTPlayerCommon.ts +2 -5
  35. package/src/components/events/LTPlayerDesktop.ts +25 -2
  36. package/src/components/events/LTPlayerMobile.ts +25 -0
  37. package/src/components/poster/LTPlayerPoster.ts +36 -22
  38. package/src/components/poster/LTPlayerPosterEvents.ts +10 -7
  39. package/src/components/poster/LTPlayerPosterManager.ts +3 -10
  40. package/src/components/share/LTPlayerShareEvents.ts +66 -3
  41. package/src/global/controllers/LTPlayerController.ts +2 -0
  42. package/src/services/Helper.ts +24 -0
  43. package/src/services/ResizeService.ts +33 -10
  44. package/src/views/additionalInfo.handlebars +58 -0
  45. package/src/views/background.handlebars +1 -1
  46. package/src/views/controls.handlebars +6 -6
  47. package/src/views/poster.handlebars +2 -1
  48. package/src/views/share.handlebars +69 -69
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latest-thinking/lt-player",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "LT player.",
5
5
  "main": "dist/js/lt-player-main.js",
6
6
  "module": "dist/js/lt-player-main.js",
@@ -18,6 +18,7 @@
18
18
  "@babel/eslint-parser": "^7.16.5",
19
19
  "@babel/plugin-proposal-class-properties": "^7.16.7",
20
20
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
21
+ "@babel/plugin-transform-runtime": "^7.21.4",
21
22
  "@babel/preset-env": "^7.16.8",
22
23
  "@babel/preset-typescript": "^7.18.6",
23
24
  "@types/hammerjs": "^2.0.41",
@@ -32,6 +33,7 @@
32
33
  "fixed": "^0.3.1",
33
34
  "hammerjs": "^2.0.8",
34
35
  "handlebars": "^4.7.7",
36
+ "hls.js": "^1.4.1-0.canary.9078",
35
37
  "html-loader": "^3.1.0",
36
38
  "json-schema-library": "^7.4.4",
37
39
  "mini-css-extract-plugin": "^2.5.1",
@@ -58,9 +60,9 @@
58
60
  "dotenv-webpack": "^8.0.1",
59
61
  "eslint": "^8.31.0",
60
62
  "eslint-webpack-plugin": "^3.1.1",
63
+ "plyr": "^3.7.3",
61
64
  "sass": "^1.60.0",
62
65
  "sass-loader": "^13.2.2",
63
- "webpack": "^5.76.3",
64
- "plyr": "^3.7.3"
66
+ "webpack": "^5.76.3"
65
67
  }
66
68
  }
@@ -73,13 +73,13 @@
73
73
  }
74
74
 
75
75
  @mixin buttons-xs {
76
- padding: 8px 8px;
76
+ padding: 7px 7px;
77
77
 
78
78
  img {
79
- width: 1rem;
80
- height: 1rem;
81
- min-width: 1rem;
82
- min-height: 1rem;
79
+ width: 16px;
80
+ height: 16px;
81
+ min-width: 16px;
82
+ min-height: 16px;
83
83
  }
84
84
  }
85
85
 
@@ -22,17 +22,17 @@
22
22
  text-decoration: none;
23
23
  vertical-align: middle;
24
24
  line-height: 150%;
25
- padding: 8px 10px;
25
+ padding: 8px 8px;
26
26
  text-align: center;
27
27
  border: none;
28
28
  border-radius: 0;
29
29
  cursor: pointer;
30
30
 
31
31
  img {
32
- width: 1.5rem;
33
- height: 1.5rem;
34
- min-width: 1.5rem;
35
- min-height: 1.5rem;
32
+ width: 24px;
33
+ height: 24px;
34
+ min-width: 24px;
35
+ min-height: 24px;
36
36
  }
37
37
  }
38
38
 
@@ -16,13 +16,13 @@
16
16
 
17
17
  $lt-font-family-base: "MuseoSans", sans-serif !important;
18
18
 
19
- $lt-player-font-size-xs: 0.75rem;
20
- $lt-player-font-size-base: 1rem;
21
- $lt-player-font-size-lg: 1.125rem;
22
- $lt-player-font-size-xl: 1.25rem;
23
- $lt-player-font-size-xxl: 1.313rem;
24
- $lt-player-font-size-xxl2: 1.5rem;
25
- $lt-player-font-size-xxxl2: 1.875rem;
19
+ $lt-player-font-size-xs: 12px;
20
+ $lt-player-font-size-base: 16px;
21
+ $lt-player-font-size-lg: 18px;
22
+ $lt-player-font-size-xl: 20px;
23
+ $lt-player-font-size-xxl: 21px;
24
+ $lt-player-font-size-xxl2: 24px;
25
+ $lt-player-font-size-xxxl2: 30px;
26
26
 
27
27
  $lt-player-font-weight-xs: 100;
28
28
  $lt-player-font-weight-sm: 300;
@@ -4,22 +4,22 @@
4
4
  font-size: $lt-player-font-size-xxxl2;
5
5
  font-weight: $lt-player-font-weight-lg;
6
6
  margin-top: 0;
7
- margin-bottom: 1rem;
7
+ margin-bottom: 16px;
8
8
  color: $default-lt-player-modal-color !important;
9
9
  }
10
10
 
11
11
  @mixin modal-h4 {
12
- font-size: $lt-player-font-size-xxl;
12
+ font-size: $lt-player-font-size-xxl2;
13
13
  font-weight: $lt-player-font-weight-lg;
14
14
  margin-bottom: 0;
15
- margin-top: 1rem;
15
+ margin-top: 16px;
16
16
  color: $default-lt-player-modal-color !important;
17
17
  }
18
18
 
19
19
  @mixin modal-b {
20
20
  display: block;
21
21
  font-size: $lt-player-font-size-base;
22
- margin-top: 1rem;
22
+ margin-top: 16px;
23
23
  color: $default-lt-player-modal-color !important;
24
24
  }
25
25
 
@@ -34,7 +34,7 @@
34
34
  @mixin modal-img {
35
35
  max-width: 100%;
36
36
  height: auto;
37
- margin-bottom: 1rem;
37
+ margin-bottom: 16px;
38
38
  }
39
39
 
40
40
  @mixin modal-text-color {
@@ -48,6 +48,17 @@
48
48
 
49
49
  .lt-player-portrate--mobile {
50
50
  &.lt-player--portrait {
51
+ &__lg,
52
+ &__md,
53
+ &__sm,
54
+ &__xs {
55
+ .player-lt {
56
+ &__modal-body {
57
+ padding: 0;
58
+ }
59
+ }
60
+ }
61
+
51
62
  &__xs {
52
63
  .player-lt {
53
64
  &__mobile {
@@ -60,7 +71,7 @@
60
71
  h6,
61
72
  p,
62
73
  b,
63
- stronb,
74
+ strong,
64
75
  span {
65
76
  font-size: $lt-player-font-size-base;
66
77
  }
@@ -93,7 +104,7 @@
93
104
  align-items: center;
94
105
  background-color: $default-lt-player-modal-header;
95
106
  min-height: 50px;
96
- padding: 0 1rem;
107
+ padding: 0 16px;
97
108
  border-radius: 15px 15px 0 0;
98
109
 
99
110
  .player-lt__close-button {
@@ -108,8 +119,9 @@
108
119
  &__modal-content {
109
120
  color: $default-lt-button-color;
110
121
  text-align: left;
111
- padding: 1rem;
122
+ padding: 16px;
112
123
  overflow: auto;
124
+ font-family: $lt-font-family-base;
113
125
 
114
126
  button,
115
127
  a {
@@ -169,7 +181,7 @@
169
181
  z-index: 50;
170
182
  left: 0;
171
183
  background: $default-lt-player-white;
172
- padding: 0 0 2rem 0;
184
+ padding: 0 0 32px 0;
173
185
  bottom: -66%;
174
186
  transition: .3s;
175
187
  max-height: 90%;
@@ -197,13 +209,35 @@
197
209
  transform: translate(-50%, -50%);
198
210
  background-color: $default-lt-player-white;
199
211
  color: $default-lt-player-modal-color;
200
- padding: 2rem 2.5rem;
201
212
  border-radius: 0;
202
213
  font-family: $lt-font-family-base;
203
214
  width: 100%;
204
215
  max-height: 540px;
205
- max-width: 715px;
206
216
  overflow: auto;
217
+ max-width: 620px;
218
+ padding: 40px 0;
219
+
220
+ span {
221
+ margin-right: 40px;
222
+ }
223
+
224
+ .modal-flex {
225
+ display: flex;
226
+ align-items: end;
227
+ gap: 24px;
228
+ flex-wrap: wrap;
229
+
230
+ img {
231
+ max-width: 220px;
232
+ margin-bottom: 0;
233
+ flex: 50%;
234
+ }
235
+
236
+ h3 {
237
+ flex: 50%;
238
+ word-break: unset;
239
+ }
240
+ }
207
241
 
208
242
  &::-webkit-scrollbar-track {
209
243
  -webkit-box-shadow: transparent;
@@ -220,7 +254,7 @@
220
254
  }
221
255
 
222
256
  hr {
223
- margin: 1rem 0;
257
+ margin: 24px 0;
224
258
  border-top: 1px solid $default-lt-button-other;
225
259
  }
226
260
 
@@ -242,7 +276,7 @@
242
276
  h1,
243
277
  h2 {
244
278
  @include modal-h2;
245
- margin-bottom: 2rem;
279
+ margin-bottom: 32px;
246
280
  }
247
281
 
248
282
  h3,
@@ -261,25 +295,33 @@
261
295
 
262
296
  p {
263
297
  @include modal-p;
264
- margin-top: .5rem;
265
- margin-bottom: 2rem;
298
+ margin-top: 8px;
299
+ margin-bottom: 32px;
300
+
301
+ &:last-child {
302
+ margin-bottom: 0;
303
+ }
266
304
  }
267
305
  }
268
306
 
307
+ &__modal-body {
308
+ padding: 0 40px;
309
+ }
310
+
269
311
  &__close-button {
270
312
  z-index: 20;
271
313
  float: right;
272
- width: 1.5rem;
273
- font-size: 1.5rem !important;
314
+ width: 24px;
315
+ font-size: $lt-player-font-size-xxxl2 !important;
274
316
  line-height: 1;
275
- padding: 0 .2em .15em;
317
+ padding: 0;
276
318
  text-align: center;
277
319
  cursor: pointer;
278
320
  border-radius: 0.25rem;
279
321
  background-color: transparent;
280
322
  color: $default-lt-button-color;
281
323
  transition: color 0.12s ease-in-out;
282
- margin-bottom: 1rem;
324
+ margin-bottom: 16px;
283
325
  position: sticky;
284
326
  top: 0;
285
327
  margin-top: 0 !important;
@@ -30,10 +30,10 @@
30
30
  align-items: end;
31
31
  display: flex;
32
32
  flex-direction: column;
33
- justify-content: end;
34
- gap: 2rem;
33
+ justify-content: flex-end;
34
+ gap: 32px;
35
35
  background: transparent;
36
- padding-bottom: 1.6rem;
36
+ padding-bottom: 25px;
37
37
  z-index: 30;
38
38
 
39
39
  button {
@@ -47,10 +47,10 @@
47
47
  align-items: end;
48
48
  display: flex;
49
49
  flex-direction: column;
50
- justify-content: end;
51
- gap: 1rem;
50
+ justify-content: flex-end;
51
+ gap: 16px;
52
52
  background: transparent;
53
- padding-bottom: 1rem;
53
+ padding-bottom: 0;
54
54
 
55
55
  button {
56
56
  @extend %lt-player-btn;
@@ -79,24 +79,25 @@
79
79
  }
80
80
 
81
81
  .plyr .plyr__controls:not(:empty) ~ .plyr__captions {
82
- bottom: 0;
83
- top: 0;
84
- transform: translateY(78%) !important;
82
+ //opacity: 0;
83
+ //bottom: 0;
84
+ //top: 0;
85
+ transform: unset!important;
85
86
  color: $default-lt-player-white !important;
86
87
  }
87
88
 
88
89
  .plyr .plyr__controls-enable:not(:empty) ~ .plyr__captions {
89
- position: absolute !important;
90
- top: 0;
91
- bottom: 0;
92
- transform: translateY(10%) !important;
90
+ //position: absolute !important;
91
+ //top: 0;
92
+ //bottom: 0;
93
+ transform: unset!important;
93
94
  }
94
95
 
95
96
  .plyr .plyr__controls-enable-settings:not(:empty) ~ .plyr__captions {
96
- position: absolute !important;
97
- top: 0;
98
- bottom: 0;
99
- transform: translateY(10%) !important;
97
+ //position: absolute !important;
98
+ //top: 0;
99
+ //bottom: 0;
100
+ transform: unset!important;
100
101
  }
101
102
 
102
103
 
@@ -32,15 +32,54 @@
32
32
  &__body {
33
33
  .content {
34
34
  &__header {
35
- padding: 2rem;
35
+ padding: 32px;
36
36
  }
37
37
 
38
38
  &__body {
39
- padding: 0 2rem;
39
+ padding: 0 32px;
40
40
  }
41
41
 
42
42
  &__footer {
43
- padding: 2rem;
43
+ padding: 32px;
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ .lt-player-landscape--mobile,
53
+ .lt-player-landscape--desktop {
54
+ &.lt-player--landscape {
55
+ &__xxs {
56
+ .plyr {
57
+ .lt-player {
58
+ &__poster {
59
+ &__body {
60
+ .content {
61
+ &__header {
62
+ padding: 10px;
63
+ }
64
+
65
+ &__body {
66
+ padding: 0 10px;
67
+
68
+ .poster-paragraph {
69
+ font-size: 16px;
70
+ }
71
+ }
72
+
73
+ &__footer {
74
+ padding: 15px 10px;
75
+
76
+ .poster-buttons {
77
+ button {
78
+ @include buttons-sm;
79
+ }
80
+ }
81
+ }
82
+ }
44
83
  }
45
84
  }
46
85
  }
@@ -58,7 +97,7 @@
58
97
  .content {
59
98
  &__body {
60
99
  .poster-paragraph {
61
- font-size: 1rem;
100
+ font-size: 16px;
62
101
  }
63
102
  }
64
103
 
@@ -69,7 +108,7 @@
69
108
  }
70
109
 
71
110
  .poster-button-watch-now {
72
- font-size: .8rem;
111
+ font-size: $lt-player-font-size-xs;
73
112
  }
74
113
  }
75
114
  }
@@ -115,13 +154,14 @@
115
154
 
116
155
  .content {
117
156
  display: flex;
157
+ width: 100%;
118
158
  flex-direction: column;
119
159
  justify-content: space-between;
120
160
  position: absolute;
121
161
  bottom: 0;
122
162
 
123
163
  &__header {
124
- padding: 1.5rem;
164
+ padding: 24px;
125
165
 
126
166
  .poster-logo-header {
127
167
  display: flex;
@@ -141,7 +181,7 @@
141
181
 
142
182
  &__body {
143
183
  margin-top: auto;
144
- padding: 0 1.5rem;
184
+ padding: 0 24px;
145
185
 
146
186
  .poster-title {
147
187
  @extend %line-clamp-3;
@@ -149,7 +189,7 @@
149
189
  color: $default-lt-player-white !important;
150
190
  font-size: $lt-player-font-size-base;
151
191
  font-weight: $lt-player-font-weight-xs;
152
- margin: 0 0 .5rem;
192
+ margin: 0 0 8px;
153
193
  }
154
194
 
155
195
  .poster-paragraph {
@@ -164,15 +204,16 @@
164
204
  }
165
205
 
166
206
  &__footer {
167
- padding: 1.5rem;
207
+ padding: 24px;
168
208
 
169
209
  .poster-buttons {
170
210
  display: flex;
171
- gap: .5rem;
211
+ gap: 8px;
172
212
 
173
213
  .poster-button-play {
174
214
  @extend %lt-player-btn;
175
215
  @include yellow-btn;
216
+ padding: 12px 12px;
176
217
  }
177
218
 
178
219
  .poster-button-watch-now {
@@ -185,6 +226,7 @@
185
226
  @extend %lt-player-btn;
186
227
  background-color: $default-lt-button-other;
187
228
  margin-left: auto;
229
+ padding: 12px 12px;
188
230
  }
189
231
  }
190
232
  }
@@ -20,7 +20,7 @@
20
20
  border-radius: 0;
21
21
 
22
22
  &__subtitles {
23
- padding: 1rem 1.5rem 1.5rem;
23
+ padding: 16px 24px 24px;
24
24
  }
25
25
 
26
26
  .line-button {
@@ -48,7 +48,7 @@
48
48
  &__button-save {
49
49
  .button-save {
50
50
  @include buttons-xs;
51
- font-size: .8rem;
51
+ font-size: $lt-player-font-size-xs;
52
52
  width: 100%;
53
53
  }
54
54
  }
@@ -80,7 +80,7 @@
80
80
  &__button-save {
81
81
  .button-save {
82
82
  @include buttons-sm;
83
- font-size: 1rem;
83
+ font-size: $lt-player-font-size-base;
84
84
  width: 100%;
85
85
  }
86
86
  }
@@ -114,7 +114,7 @@
114
114
  left: 0;
115
115
  background: $default-lt-player-white;
116
116
  border-radius: 0 0 0 30px;
117
- padding: 0 0 2rem 0;
117
+ padding: 0 0 32px 0;
118
118
  bottom: -200%;
119
119
  transition:.3s;
120
120
 
@@ -141,10 +141,10 @@
141
141
  bottom: 0;
142
142
  display: flex;
143
143
  flex-direction: column;
144
- padding: 0 0 1.5rem 0;
144
+ padding: 0 0 24px 0;
145
145
 
146
146
  &__speed-range {
147
- padding: 1.5rem 1.5rem 0 1.5rem;
147
+ padding: 24px 24px 0 24px;
148
148
  align-items: center;
149
149
  color: $default-lt-player-black;
150
150
  display: flex;
@@ -212,7 +212,7 @@
212
212
 
213
213
  .speed-range-input {
214
214
  color: $default-lt-player-blue;
215
- height: 2rem;
215
+ height: 32px;
216
216
  cursor: pointer;
217
217
  }
218
218
 
@@ -245,7 +245,7 @@
245
245
  &__subtitles {
246
246
  display: flex;
247
247
  justify-content: space-between;
248
- padding: 1rem 1.5rem 0 1.5rem;
248
+ padding: 16px 24px 0 24px;
249
249
  align-items: center;
250
250
 
251
251
  .subtitles-body__input-switch:checked + .subtitles-body__slider {
@@ -289,7 +289,9 @@
289
289
  background-color: #E6E6E6;
290
290
  -webkit-transition: 0.4s;
291
291
  transition: 0.4s;
292
- display: inline-block
292
+ display: inline-block;
293
+ margin-bottom: 0!important;
294
+ margin-top: 0!important;
293
295
  }
294
296
 
295
297
  &__slider:focus {
@@ -311,7 +313,7 @@
311
313
  }
312
314
 
313
315
  &__button-save {
314
- padding: 1rem 1.5rem 0 1.5rem;
316
+ padding: 16px 24px 0 24px;
315
317
  color: black;
316
318
  display: flex;
317
319
  justify-content: left;
@@ -319,12 +321,12 @@
319
321
  .button-save {
320
322
  @extend %lt-player-btn;
321
323
  @include yellow-btn;
322
- padding: .75rem 2rem;
324
+ padding: 12px 32px;
323
325
  }
324
326
  }
325
327
 
326
328
  &__exit-button {
327
- padding: 1rem;
329
+ padding: 16px;
328
330
 
329
331
  span {
330
332
  display: flex;