@latest-thinking/lt-player 1.1.0-g → 1.1.0-i

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latest-thinking/lt-player",
3
- "version": "1.1.0-g",
3
+ "version": "1.1.0-i",
4
4
  "description": "LT player.",
5
5
  "main": "dist/js/lt-player-main.js",
6
6
  "module": "dist/js/lt-player-main.js",
@@ -6,7 +6,6 @@ import Hls from "hls.js";
6
6
  export class LTPlayerUpdate {
7
7
 
8
8
  player: LTPlayer.PortraitType;
9
- additionalInfoService: LTPLayerAddInfo.Controller;
10
9
 
11
10
  constructor(player: LTPlayer.PortraitType) {
12
11
  this.player = player;
@@ -15,10 +14,15 @@ export class LTPlayerUpdate {
15
14
  updatePlayer(config: defaultType) {
16
15
  this.updateSource(config.body.videoUrl);
17
16
  this.updateTitle(config.body.videoParagraph);
17
+ this.updateChapters(config);
18
18
  this.player.additionalInfoService.setConfig(config.body.additionalInfo);
19
19
  return;
20
20
  }
21
21
 
22
+ updateChapters(config: defaultType) {
23
+ this.player.playerControl.initChapters(config.body.chapters);
24
+ }
25
+
22
26
  updateSource(videoUrl: string) {
23
27
  if (Hls.isSupported()) {
24
28
  this.player.hls.hlsInstance.detachMedia();
@@ -30,9 +34,7 @@ export class LTPlayerUpdate {
30
34
  }
31
35
 
32
36
  updateTitle(title: string) {
33
- console.log(title);
34
37
  const titleHeader = document.querySelector('.poster-title');
35
- console.log(titleHeader)
36
38
  titleHeader.textContent = '';
37
39
  titleHeader.textContent = title;
38
40
  }
@@ -70,7 +70,7 @@ export class LTPlayerChapters {
70
70
 
71
71
  if (chapters !== undefined) {
72
72
  instance.playerControl.chaptersService.setChapterPreviousNext(chapters[2], chapters[0]);
73
- instance.playerControl.chaptersService.setTitleChapterName(chapters[1]);
73
+ // instance.playerControl.chaptersService.setTitleChapterName(chapters[1]);
74
74
  instance.playerControl.chaptersService.setButtonsChapterTime(chapters[0], chapters[2])
75
75
  }
76
76
  }
@@ -20,7 +20,6 @@
20
20
  <div class="top-controllers__body__left">
21
21
  </div>
22
22
  <div class="top-controllers__body__center">
23
- <p class="chapter"></p>
24
23
  </div>
25
24
  <div class="top-controllers__body__right">
26
25
  {{#isShare}}
@@ -206,7 +205,6 @@
206
205
  {{/isShare}}
207
206
  </div>
208
207
  <div class="top-controllers__body__center">
209
- <p class="chapter"></p>
210
208
  </div>
211
209
  <div class="top-controllers__body__right">
212
210
  {{#desktop}}