@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.
- package/.babelrc +2 -1
- 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/package.json +5 -3
- package/src/assets/sass/abstracts/_mixins.scss +5 -5
- package/src/assets/sass/abstracts/_placeholders.scss +5 -5
- package/src/assets/sass/abstracts/_variables.scss +7 -7
- package/src/assets/sass/components/_modal.scss +61 -19
- package/src/assets/sass/sections/_additional-info.scss +6 -6
- package/src/assets/sass/sections/_control.scss +12 -11
- package/src/assets/sass/sections/_poster.scss +52 -10
- package/src/assets/sass/sections/_settings.scss +14 -12
- package/src/assets/sass/sections/_share.scss +123 -100
- package/src/assets/sass/sections/_subtitles.scss +14 -1
- package/src/assets/sass/sections/controllers/_botom.scss +160 -98
- package/src/assets/sass/sections/controllers/_mini-player.scss +18 -3
- package/src/assets/sass/sections/controllers/_notification-rewind-forward.scss +48 -85
- package/src/assets/sass/sections/controllers/_top.scss +39 -13
- package/src/components/LTPlayerDevMethode.ts +23 -3
- package/src/components/LTPlayerHls.ts +29 -0
- package/src/components/LTPlayerSetup.ts +14 -8
- package/src/components/LTPlayerType.ts +84 -34
- package/src/components/addInfo/LTPlayerAddInfoManager.ts +12 -5
- package/src/components/addInfo/LTPlayerAdditionalInfoEvents.ts +37 -12
- package/src/components/config/LTPlayerConfig.ts +29 -0
- package/src/components/config/LTPlayerConfigProcessor.ts +9 -5
- package/src/components/controls/LTPlayerControlsEvents.ts +26 -10
- package/src/components/controls/LTPlayerMini.ts +75 -5
- package/src/components/controls/settings/LTPlayerDesktopSettingsControllers.ts +2 -2
- package/src/components/controls/settings/LTPlayerMobileSettingsControllers.ts +4 -4
- package/src/components/events/LTPlayer.ts +10 -1
- package/src/components/events/LTPlayerCommon.ts +2 -5
- package/src/components/events/LTPlayerDesktop.ts +25 -2
- package/src/components/events/LTPlayerMobile.ts +25 -0
- package/src/components/poster/LTPlayerPoster.ts +36 -22
- package/src/components/poster/LTPlayerPosterEvents.ts +10 -7
- package/src/components/poster/LTPlayerPosterManager.ts +3 -10
- package/src/components/share/LTPlayerShareEvents.ts +66 -3
- package/src/global/controllers/LTPlayerController.ts +2 -0
- package/src/services/Helper.ts +24 -0
- package/src/services/ResizeService.ts +33 -10
- package/src/views/additionalInfo.handlebars +58 -0
- package/src/views/background.handlebars +1 -1
- package/src/views/controls.handlebars +6 -6
- package/src/views/poster.handlebars +2 -1
- package/src/views/share.handlebars +69 -69
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100%;
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
.lt-player-mini-player-observe {
|
|
8
|
+
min-height: 200px;
|
|
9
|
+
max-height: 600px;
|
|
10
|
+
height: auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
6
13
|
.lt-player-mini-enable {
|
|
7
14
|
position: fixed;
|
|
8
15
|
z-index: 10000;
|
|
9
|
-
max-width: 160px;
|
|
10
|
-
max-height: 290px;
|
|
11
16
|
bottom: 20px;
|
|
12
17
|
right: 20px;
|
|
13
18
|
opacity: 1;
|
|
@@ -19,6 +24,16 @@
|
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
26
|
|
|
27
|
+
.lt-player-mini-2 {
|
|
28
|
+
max-width: 344px;
|
|
29
|
+
max-height: 194px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.lt-player-mini-1 {
|
|
33
|
+
max-width: 160px;
|
|
34
|
+
max-height: 290px;
|
|
35
|
+
}
|
|
36
|
+
|
|
22
37
|
.lt-player-mini-player-background {
|
|
23
38
|
z-index: 100;
|
|
24
39
|
|
|
@@ -63,7 +78,7 @@
|
|
|
63
78
|
&__play-button {
|
|
64
79
|
@extend %lt-player-btn;
|
|
65
80
|
@include yellow-btn;
|
|
66
|
-
padding:
|
|
81
|
+
padding: 12px;
|
|
67
82
|
}
|
|
68
83
|
|
|
69
84
|
&__progress__seek {
|
|
@@ -3,19 +3,18 @@
|
|
|
3
3
|
&__xs {
|
|
4
4
|
.lt-player-notification {
|
|
5
5
|
.lt-player-video-content {
|
|
6
|
-
padding: 0
|
|
6
|
+
padding: 0 16px;
|
|
7
7
|
|
|
8
8
|
.poster-title {
|
|
9
9
|
@extend %line-clamp-3;
|
|
10
10
|
@include line-clamp-3;
|
|
11
|
-
font-size:
|
|
11
|
+
font-size: $lt-player-font-size-xs;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.poster-paragraph {
|
|
15
15
|
&__content {
|
|
16
|
-
font-size:
|
|
16
|
+
font-size: 14px;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
}
|
|
@@ -25,7 +24,7 @@
|
|
|
25
24
|
.lt-player-notification {
|
|
26
25
|
.lt-player-video-content {
|
|
27
26
|
.poster-title {
|
|
28
|
-
font-size:
|
|
27
|
+
font-size: $lt-player-font-size-base;
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
}
|
|
@@ -37,11 +36,14 @@
|
|
|
37
36
|
width: 100%;
|
|
38
37
|
height: 100%;
|
|
39
38
|
display: flex;
|
|
40
|
-
|
|
39
|
+
|
|
40
|
+
&.portrait {
|
|
41
|
+
position: relative;
|
|
42
|
+
}
|
|
41
43
|
|
|
42
44
|
&__notification-button-state {
|
|
43
45
|
position: absolute;
|
|
44
|
-
top:
|
|
46
|
+
top: 50%;
|
|
45
47
|
left: 50%;
|
|
46
48
|
transform: translate(-50%, -50%);
|
|
47
49
|
|
|
@@ -52,7 +54,7 @@
|
|
|
52
54
|
@extend %lt-player-btn;
|
|
53
55
|
@include dark-btn;
|
|
54
56
|
background: rgba(39, 40, 42, 0.5);
|
|
55
|
-
padding:
|
|
57
|
+
padding: 16px;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
.active {
|
|
@@ -63,16 +65,16 @@
|
|
|
63
65
|
|
|
64
66
|
.lt-player-video-content {
|
|
65
67
|
position: absolute;
|
|
66
|
-
bottom:
|
|
68
|
+
bottom: 176px;
|
|
67
69
|
text-align: left;
|
|
68
70
|
display: flex;
|
|
69
|
-
padding: 0
|
|
71
|
+
padding: 0 24px;
|
|
70
72
|
width: 100%;
|
|
71
|
-
|
|
73
|
+
user-select: none;
|
|
74
|
+
align-items: end;
|
|
72
75
|
|
|
73
76
|
.content__body {
|
|
74
77
|
z-index: 2;
|
|
75
|
-
margin-top: auto;
|
|
76
78
|
width: 100%;
|
|
77
79
|
}
|
|
78
80
|
|
|
@@ -80,16 +82,13 @@
|
|
|
80
82
|
@extend %line-clamp-3;
|
|
81
83
|
@include line-clamp-4;
|
|
82
84
|
color: $default-lt-player-white !important;
|
|
83
|
-
font-size:
|
|
85
|
+
font-size: $lt-player-font-size-xxl;
|
|
84
86
|
font-weight: $lt-player-font-weight-lg;
|
|
85
87
|
line-height: $lt-player-line-height;
|
|
86
88
|
margin: 0;
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
.poster-paragraph {
|
|
90
|
-
|
|
91
|
-
margin-bottom: 3rem;
|
|
92
|
-
|
|
93
92
|
&__content {
|
|
94
93
|
display: -webkit-box;
|
|
95
94
|
-webkit-line-clamp: 2;
|
|
@@ -97,11 +96,11 @@
|
|
|
97
96
|
word-wrap: break-word;
|
|
98
97
|
text-overflow: ellipsis;
|
|
99
98
|
overflow: hidden;
|
|
100
|
-
|
|
99
|
+
font-size: $lt-player-font-size-base;
|
|
101
100
|
font-weight: $lt-player-font-weight-sm;
|
|
102
101
|
color: $default-lt-player-white !important;
|
|
103
102
|
margin-bottom: 0;
|
|
104
|
-
max-height:
|
|
103
|
+
max-height: 50px;
|
|
105
104
|
transition: max-height 0.3s ease-in-out;
|
|
106
105
|
}
|
|
107
106
|
|
|
@@ -119,38 +118,37 @@
|
|
|
119
118
|
border: none;
|
|
120
119
|
margin: 0;
|
|
121
120
|
text-decoration: none;
|
|
122
|
-
font-size:
|
|
121
|
+
font-size: $lt-player-font-size-xs;
|
|
123
122
|
color: white;
|
|
124
123
|
cursor: pointer;
|
|
125
124
|
position: absolute;
|
|
126
|
-
bottom:
|
|
127
|
-
right:
|
|
125
|
+
bottom: 144px;
|
|
126
|
+
right: 96px;
|
|
128
127
|
z-index: 8;
|
|
129
128
|
}
|
|
130
129
|
|
|
131
|
-
|
|
132
|
-
.lt-player-
|
|
130
|
+
.lt-player-rewind-area,
|
|
131
|
+
.lt-player-forward-area {
|
|
133
132
|
touch-action: inherit!important;
|
|
134
133
|
width: 100%;
|
|
135
134
|
height: 100%;
|
|
136
|
-
z-index:
|
|
135
|
+
z-index: 4;
|
|
137
136
|
}
|
|
138
137
|
|
|
139
|
-
.lt-player-rewind
|
|
138
|
+
.lt-player-rewind,
|
|
139
|
+
.lt-player-forward {
|
|
140
140
|
width: 50%;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
display:flex;
|
|
144
|
-
flex-direction: row;
|
|
141
|
+
top: 10%;
|
|
142
|
+
display: flex;
|
|
145
143
|
position: absolute;
|
|
146
144
|
text-align: center;
|
|
147
|
-
border-radius:
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
border-radius: 100% 0 0 100%;
|
|
146
|
+
height: unset;
|
|
147
|
+
bottom: 10%;
|
|
150
148
|
|
|
151
149
|
&__icon-wrapper {
|
|
152
150
|
display: flex;
|
|
153
|
-
padding: 0
|
|
151
|
+
padding: 0 8px;
|
|
154
152
|
user-select: none;
|
|
155
153
|
|
|
156
154
|
&.rotate {
|
|
@@ -164,83 +162,48 @@
|
|
|
164
162
|
|
|
165
163
|
&__icon {
|
|
166
164
|
display: flex;
|
|
167
|
-
justify-content:flex-start;
|
|
168
|
-
align-items:center;
|
|
169
|
-
|
|
165
|
+
justify-content: flex-start;
|
|
166
|
+
align-items: center;
|
|
170
167
|
color: rgba(255,255,255, 1);
|
|
171
168
|
user-select: none;
|
|
172
|
-
|
|
173
|
-
&__portrait {
|
|
174
|
-
margin: auto auto 18rem 3rem;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
&__landscape {
|
|
178
|
-
margin: auto auto 13rem 4rem;
|
|
179
|
-
}
|
|
180
169
|
}
|
|
181
170
|
|
|
182
171
|
span {
|
|
183
|
-
font-size:
|
|
172
|
+
font-size: $lt-player-font-size-xs;
|
|
184
173
|
user-select: none;
|
|
185
174
|
}
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.lt-player-forward-area {
|
|
190
|
-
touch-action: inherit!important;
|
|
191
|
-
width: 100%;
|
|
192
|
-
height: 100%;
|
|
193
|
-
z-index: 4;
|
|
194
175
|
}
|
|
195
176
|
|
|
196
|
-
.lt-player-
|
|
197
|
-
|
|
198
|
-
height: 130%;
|
|
199
|
-
top: -10rem;
|
|
200
|
-
display:flex;
|
|
201
|
-
flex-direction: row;
|
|
202
|
-
position: absolute;
|
|
203
|
-
text-align: center;
|
|
204
|
-
border-radius:100% 0 0 100%;
|
|
205
|
-
right: 0;
|
|
177
|
+
.lt-player-rewind {
|
|
178
|
+
left: 0;
|
|
206
179
|
|
|
207
|
-
&__icon
|
|
208
|
-
|
|
209
|
-
padding: 0 .5rem;
|
|
180
|
+
&__icon {
|
|
181
|
+
flex-direction: row-reverse;
|
|
210
182
|
|
|
211
|
-
|
|
212
|
-
|
|
183
|
+
&__portrait {
|
|
184
|
+
margin: auto auto auto 48px;
|
|
213
185
|
}
|
|
214
186
|
|
|
215
|
-
|
|
216
|
-
|
|
187
|
+
&__landscape {
|
|
188
|
+
margin: auto auto auto 64px;
|
|
217
189
|
}
|
|
218
190
|
}
|
|
191
|
+
}
|
|
219
192
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
justify-content:flex-start;
|
|
223
|
-
align-items:center;
|
|
224
|
-
|
|
225
|
-
color: rgba(255,255,255, 1);
|
|
193
|
+
.lt-player-forward {
|
|
194
|
+
right: 0;
|
|
226
195
|
|
|
196
|
+
&__icon {
|
|
227
197
|
&__portrait {
|
|
228
|
-
margin: auto
|
|
198
|
+
margin: auto 48px auto auto;
|
|
229
199
|
}
|
|
230
200
|
|
|
231
201
|
&__landscape {
|
|
232
|
-
margin: auto
|
|
202
|
+
margin: auto 64px auto auto;
|
|
233
203
|
}
|
|
234
|
-
|
|
235
204
|
}
|
|
236
|
-
|
|
237
|
-
span{
|
|
238
|
-
font-size:12px;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
205
|
}
|
|
242
206
|
|
|
243
|
-
|
|
244
207
|
.lt-player-notify {
|
|
245
208
|
transition: background 0.8s;
|
|
246
209
|
//background: rgba(200,200,200,.4) radial-gradient(circle, transparent 1%, rgba(200,200,200,.4) 1%) center/15000%;
|
|
@@ -6,7 +6,30 @@
|
|
|
6
6
|
&__controls-enable,
|
|
7
7
|
&__controls-enable-settings {
|
|
8
8
|
.top-controllers {
|
|
9
|
-
padding:
|
|
9
|
+
padding: 40px 40px 0;
|
|
10
|
+
|
|
11
|
+
&__background {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.lt-player-landscape--mobile,
|
|
20
|
+
.lt-player-landscape--desktop {
|
|
21
|
+
&.lt-player--landscape {
|
|
22
|
+
&__xxs {
|
|
23
|
+
.plyr {
|
|
24
|
+
&__controls {
|
|
25
|
+
.top-controllers {
|
|
26
|
+
padding: 10px;
|
|
27
|
+
|
|
28
|
+
button {
|
|
29
|
+
@include buttons-xs;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
10
33
|
}
|
|
11
34
|
}
|
|
12
35
|
}
|
|
@@ -19,7 +42,7 @@
|
|
|
19
42
|
.plyr {
|
|
20
43
|
&__controls {
|
|
21
44
|
.top-controllers {
|
|
22
|
-
padding:
|
|
45
|
+
padding: 16px;
|
|
23
46
|
|
|
24
47
|
button {
|
|
25
48
|
@include buttons-xs;
|
|
@@ -43,10 +66,10 @@
|
|
|
43
66
|
&__controls-enable,
|
|
44
67
|
&__controls-enable-settings {
|
|
45
68
|
.top-controllers {
|
|
46
|
-
z-index: 10;
|
|
47
69
|
width: 100%;
|
|
48
|
-
|
|
49
|
-
|
|
70
|
+
padding: 24px 24px 0 24px;
|
|
71
|
+
position: absolute;
|
|
72
|
+
|
|
50
73
|
button {
|
|
51
74
|
@extend %lt-player-btn;
|
|
52
75
|
@include dark-btn;
|
|
@@ -60,17 +83,23 @@
|
|
|
60
83
|
height: 20%;
|
|
61
84
|
background: var(--plyr-video-controls-background,linear-gradient(transparent,rgba(0,0,0,.75)));
|
|
62
85
|
rotate: 180deg;
|
|
86
|
+
display: none;
|
|
63
87
|
}
|
|
64
88
|
|
|
65
89
|
&__body {
|
|
66
90
|
display: flex;
|
|
67
91
|
justify-content: space-between;
|
|
68
92
|
|
|
69
|
-
&__left
|
|
93
|
+
&__left,
|
|
94
|
+
&__right {
|
|
70
95
|
display: flex;
|
|
71
96
|
flex-direction: column;
|
|
72
|
-
|
|
73
|
-
|
|
97
|
+
flex: 0 0 12%;
|
|
98
|
+
z-index: 5;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&__left {
|
|
102
|
+
align-items: flex-start;
|
|
74
103
|
}
|
|
75
104
|
|
|
76
105
|
&__center {
|
|
@@ -78,10 +107,7 @@
|
|
|
78
107
|
}
|
|
79
108
|
|
|
80
109
|
&__right {
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: column;
|
|
83
110
|
align-items: end;
|
|
84
|
-
flex: 0 0 20%
|
|
85
111
|
}
|
|
86
112
|
|
|
87
113
|
&__center {
|
|
@@ -101,7 +127,7 @@
|
|
|
101
127
|
&__right {
|
|
102
128
|
|
|
103
129
|
.mini-player-control {
|
|
104
|
-
margin-top:
|
|
130
|
+
margin-top: 16px;
|
|
105
131
|
}
|
|
106
132
|
}
|
|
107
133
|
}
|
|
@@ -159,4 +185,4 @@
|
|
|
159
185
|
// }
|
|
160
186
|
//
|
|
161
187
|
//}
|
|
162
|
-
}
|
|
188
|
+
}
|
|
@@ -8,9 +8,11 @@ export namespace LTPlayerDevMethode {
|
|
|
8
8
|
export class Player {
|
|
9
9
|
|
|
10
10
|
player: Plyr
|
|
11
|
+
instance : LTPlayer.PortraitType | LTPlayer.LandscapeType
|
|
11
12
|
|
|
12
|
-
constructor(
|
|
13
|
-
this.player =
|
|
13
|
+
constructor(instance: LTPlayer.PortraitType | LTPlayer.LandscapeType) {
|
|
14
|
+
this.player = instance.plyr;
|
|
15
|
+
this.instance = instance
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
play() {
|
|
@@ -77,7 +79,9 @@ export namespace LTPlayerDevMethode {
|
|
|
77
79
|
let miniPlayer = {
|
|
78
80
|
controls : playerContainer.querySelector('.lt-player-mini-player-controls'),
|
|
79
81
|
background: playerContainer.querySelector('.lt-player-mini-player-background'),
|
|
80
|
-
enable: playerContainer.querySelector('.lt-player-mini-enable')
|
|
82
|
+
enable: playerContainer.querySelector('.lt-player-mini-enable'),
|
|
83
|
+
size_land: playerContainer.querySelector(`.lt-player-mini-1`),
|
|
84
|
+
size_port: playerContainer.querySelector(`.lt-player-mini-2`)
|
|
81
85
|
};
|
|
82
86
|
|
|
83
87
|
if (miniPlayer.controls) {
|
|
@@ -88,6 +92,14 @@ export namespace LTPlayerDevMethode {
|
|
|
88
92
|
miniPlayer.background.remove();
|
|
89
93
|
}
|
|
90
94
|
|
|
95
|
+
if (miniPlayer.size_land) {
|
|
96
|
+
miniPlayer.size_land.classList.remove(`lt-player-mini-1`)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (miniPlayer.size_port) {
|
|
100
|
+
miniPlayer.size_port.classList.remove(`lt-player-mini-2`)
|
|
101
|
+
}
|
|
102
|
+
|
|
91
103
|
if (miniPlayer.enable) {
|
|
92
104
|
miniPlayer.enable.classList.remove('lt-player-mini-enable')
|
|
93
105
|
}
|
|
@@ -106,6 +118,14 @@ export namespace LTPlayerDevMethode {
|
|
|
106
118
|
exitFullScreen();
|
|
107
119
|
|
|
108
120
|
}
|
|
121
|
+
|
|
122
|
+
enterMiniPlayer() {
|
|
123
|
+
this.instance.miniPlayer.enterMiniPlayer();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
exitMiniPlayer() {
|
|
127
|
+
this.instance.miniPlayer.exitMiniPlayer(this.player);
|
|
128
|
+
}
|
|
109
129
|
}
|
|
110
130
|
|
|
111
131
|
export class Preload {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {LTPlayer} from "./LTPlayerType";
|
|
2
|
+
import {LTPlayerConfig} from "./config/LTPlayerConfig";
|
|
3
|
+
import Hls from "hls.js";
|
|
4
|
+
import {defaultType} from "../global/types/ModuleTypes";
|
|
5
|
+
|
|
6
|
+
export class LTPlayerHls {
|
|
7
|
+
instance : LTPlayer.LandscapeType | LTPlayer.PortraitType
|
|
8
|
+
config : LTPlayerConfig
|
|
9
|
+
playerSettings : defaultType
|
|
10
|
+
|
|
11
|
+
hlsInstance : Hls
|
|
12
|
+
|
|
13
|
+
constructor(instance : LTPlayer.LandscapeType | LTPlayer.PortraitType, playerSettings : defaultType) {
|
|
14
|
+
this.instance = instance;
|
|
15
|
+
this.config = instance.playerConfig;
|
|
16
|
+
this.playerSettings = playerSettings;
|
|
17
|
+
this.hlsInstance = new Hls();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
init() {
|
|
21
|
+
if (Hls.isSupported()) {
|
|
22
|
+
this.hlsInstance.loadSource(this.config.getVideoUrl().videoUrl);
|
|
23
|
+
this.hlsInstance.attachMedia(this.config.getPlayerElementContainer().querySelector('video'));
|
|
24
|
+
this.hlsInstance.on(Hls.Events.MANIFEST_PARSED,function() {
|
|
25
|
+
console.log('MANIFEST_PARSED');
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -85,6 +85,7 @@ export class LTPlayerSetup {
|
|
|
85
85
|
if (checkVersion(playerConfig.version)) {
|
|
86
86
|
return new Promise((resolve, reject) => {
|
|
87
87
|
playerConfig.body.playerType = 2;
|
|
88
|
+
|
|
88
89
|
resolve(this.setType(playerConfig, playerContainer));
|
|
89
90
|
reject(null);
|
|
90
91
|
});
|
|
@@ -200,12 +201,8 @@ export class LTPlayerSetup {
|
|
|
200
201
|
return processVideo();
|
|
201
202
|
|
|
202
203
|
}
|
|
203
|
-
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
206
|
/**
|
|
210
207
|
* Set Additional Info
|
|
211
208
|
* @param playerConfig
|
|
@@ -214,15 +211,24 @@ export class LTPlayerSetup {
|
|
|
214
211
|
|
|
215
212
|
const additionalInfoContainer:HTMLElement = playerConfig.body.playerContainer.querySelector('.lt-player-additional-info');
|
|
216
213
|
|
|
217
|
-
if (
|
|
218
|
-
this.additionalInfoService =
|
|
214
|
+
if (additionalInfoContainer) {
|
|
215
|
+
this.additionalInfoService = new LTPLayerAddInfo.Controller();
|
|
216
|
+
this.additionalInfoService.setContainer(additionalInfoContainer);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
if (playerConfig.body.additionalInfo !== undefined && Object.keys(playerConfig.body.additionalInfo).length > 0) {
|
|
222
|
+
this.additionalInfoService = new LTPLayerAddInfo.Controller();
|
|
223
|
+
this.additionalInfoService.setConfig(playerConfig.body.additionalInfo);
|
|
219
224
|
return;
|
|
220
225
|
}
|
|
221
226
|
|
|
222
|
-
this.additionalInfoService = new LTPLayerAddInfo.Controller();
|
|
223
|
-
this.additionalInfoService.set(additionalInfoContainer);
|
|
224
227
|
|
|
228
|
+
this.additionalInfoService = null;
|
|
225
229
|
return;
|
|
230
|
+
|
|
231
|
+
|
|
226
232
|
}
|
|
227
233
|
|
|
228
234
|
/**
|