@latest-thinking/lt-player 1.1.0-j → 1.1.0-k
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/dist/js/lt-player-main.js +1 -1
- package/dist/js/lt-player-main.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LTPlayerUpdate.ts +7 -0
- package/src/components/config/LTPlayerConfig.ts +4 -0
- package/src/components/config/LTPlayerConfigProcessor.ts +20 -0
- package/src/views/controls.handlebars +14 -14
- package/src/views/poster.handlebars +2 -2
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ export class LTPlayerUpdate {
|
|
|
14
14
|
updatePlayer(config: defaultType) {
|
|
15
15
|
this.updateSource(config.body.videoUrl);
|
|
16
16
|
this.updateTitle(config.body.videoParagraph);
|
|
17
|
+
this.updateAuthor(config.body.videoTitle);
|
|
17
18
|
this.updateChapters(config);
|
|
18
19
|
this.player.additionalInfoService.setConfig(config.body.additionalInfo);
|
|
19
20
|
return;
|
|
@@ -38,4 +39,10 @@ export class LTPlayerUpdate {
|
|
|
38
39
|
titleHeader.textContent = '';
|
|
39
40
|
titleHeader.textContent = title;
|
|
40
41
|
}
|
|
42
|
+
|
|
43
|
+
updateAuthor(author: string) {
|
|
44
|
+
const authorParagraph = document.querySelector('.poster-paragraph__content');
|
|
45
|
+
authorParagraph.textContent = '';
|
|
46
|
+
authorParagraph.textContent = author;
|
|
47
|
+
}
|
|
41
48
|
}
|
|
@@ -9,6 +9,7 @@ export class LTPlayerConfig {
|
|
|
9
9
|
embed: false,
|
|
10
10
|
preload: false,
|
|
11
11
|
autoPlay : false,
|
|
12
|
+
fullscreenDisabled: false,
|
|
12
13
|
videoTitle: '',
|
|
13
14
|
posterImage: '',
|
|
14
15
|
videoParagraph: '',
|
|
@@ -226,6 +227,9 @@ export class LTPlayerConfig {
|
|
|
226
227
|
}
|
|
227
228
|
|
|
228
229
|
getFullscreenMode() {
|
|
230
|
+
if (this.configData.fullscreenDisabled) {
|
|
231
|
+
return {fullscreen: {enabled: false}};
|
|
232
|
+
}
|
|
229
233
|
return {fullscreen: {enabled: true}};
|
|
230
234
|
|
|
231
235
|
if (this.getDevice() === 'mobile') {
|
|
@@ -25,6 +25,8 @@ export namespace LTPlayerConfigProcessor {
|
|
|
25
25
|
return Processor.processVideoTitle(value, this.version);
|
|
26
26
|
case 'posterImage' :
|
|
27
27
|
return Processor.processPosterImage(value, this.version);
|
|
28
|
+
case 'fullscreenDisabled' :
|
|
29
|
+
return Processor.processFullscreenDisabled(value, this.version);
|
|
28
30
|
case 'videoParagraph':
|
|
29
31
|
return Processor.processVideoParagraph(value, this.version);
|
|
30
32
|
case 'videoUrl' :
|
|
@@ -560,6 +562,24 @@ export namespace LTPlayerConfigProcessor {
|
|
|
560
562
|
}
|
|
561
563
|
|
|
562
564
|
|
|
565
|
+
if (typeof data === 'string') {
|
|
566
|
+
if (data === 'true') {
|
|
567
|
+
outputData = true;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
if (typeof data === 'boolean') {
|
|
572
|
+
if (data) {
|
|
573
|
+
outputData = true;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
return outputData;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
static processFullscreenDisabled(data : boolean | string | object, version : number) {
|
|
581
|
+
let outputData = false;
|
|
582
|
+
|
|
563
583
|
if (typeof data === 'string') {
|
|
564
584
|
if (data === 'true') {
|
|
565
585
|
outputData = true;
|
|
@@ -208,22 +208,22 @@
|
|
|
208
208
|
</div>
|
|
209
209
|
<div class="top-controllers__body__right">
|
|
210
210
|
{{#desktop}}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
211
|
+
<button type="button" class="plyr__control fullscreen-custom-control">
|
|
212
|
+
<img class="filter minimize d-none" src="{{icons.minimize}}" alt="">
|
|
213
|
+
<img class="filter maximize" src="{{icons.maximize}}" alt="">
|
|
214
|
+
</button>
|
|
215
|
+
<button type="button" class="plyr__control mini-player-control">
|
|
216
|
+
<img class="filter" src="{{icons.mini-player}}" alt="">
|
|
217
|
+
</button>
|
|
218
218
|
{{/desktop}}
|
|
219
219
|
{{#mobile}}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
220
|
+
<button type="button" class="plyr__control fullscreen-custom-control">
|
|
221
|
+
<img class="filter minimize d-none" src="{{icons.minimize}}" alt="">
|
|
222
|
+
<img class="filter maximize" src="{{icons.maximize}}" alt="">
|
|
223
|
+
</button>
|
|
224
|
+
<button type="button" class="plyr__control mini-player-control">
|
|
225
|
+
<img class="filter" src="{{icons.mini-player}}" alt="">
|
|
226
|
+
</button>
|
|
227
227
|
{{/mobile}}
|
|
228
228
|
</div>
|
|
229
229
|
</div>
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
<img src="{{config.logo}}" alt="logo">
|
|
12
12
|
</div>
|
|
13
13
|
<div class="content__body">
|
|
14
|
-
<div class="poster-title">{{config.configData.
|
|
15
|
-
<div class="poster-paragraph">{{config.configData.
|
|
14
|
+
<div class="poster-title">{{config.configData.videoTitle}}</div>
|
|
15
|
+
<div class="poster-paragraph">{{config.configData.videoParagraph}}</div>
|
|
16
16
|
</div>
|
|
17
17
|
<div class="content__footer">
|
|
18
18
|
<div class="poster-buttons">
|