@latest-thinking/lt-player 1.1.0-m → 1.1.0-o

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.
@@ -38,15 +38,15 @@
38
38
  "language": "en",
39
39
  "update": true,
40
40
  "label": "asdfasdfasdf",
41
- "url": "/lt-player/examples/samples/vtt/Pahl-Kerstin-Maria-MAIN-20230320.vtt",
41
+ "url": "../examples/samples/vtt/Pahl-Kerstin-Maria-MAIN-20230320.vtt",
42
42
  "srclang": "en"
43
43
  }
44
44
  },
45
+ "removeFromInterfaceToggle": ["text", "progressBar", "controls"],
45
46
  "videoTitle": "Maja Adena",
46
47
  "posterImage": "https://web.lt.dev.welink.sh/sites/default/files/2023-09/Video%201.00_00_00_00.Standbild001.jpg",
47
48
  "videoParagraph": "What Are Some Unintended Consequences of Pension Reform?",
48
49
  "videoUrl": "https://player.vimeo.com/external/837554695.m3u8?s=0c690ee7961cdfabf925774a536d2376e155d7fe",
49
- "tracks": "https://web.lt.dev.welink.sh/sites/default/files/video-short/subtitles/Pahl-Kerstin-Maria-MAIN-20230320.vtt",
50
50
  "fullscreenDisabled": true,
51
51
  "share": [],
52
52
  "additionalInfo": {
@@ -70,7 +70,7 @@
70
70
 
71
71
  <script>
72
72
  window.addEventListener("load", () => {
73
-
73
+
74
74
  });
75
75
  </script>
76
76
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latest-thinking/lt-player",
3
- "version": "1.1.0-m",
3
+ "version": "1.1.0-o",
4
4
  "description": "LT player.",
5
5
  "main": "dist/js/lt-player-main.js",
6
6
  "module": "dist/js/lt-player-main.js",
@@ -15,7 +15,7 @@
15
15
  display: flex;
16
16
  justify-content: center;
17
17
  margin: auto;
18
- width: 75%;
18
+ width: 100%;
19
19
  color: $default-lt-player-black;
20
20
  background-color: rgba(216, 216, 70, 0.7);
21
21
  font-size: $lt-player-font-size-lg;
@@ -27,6 +27,11 @@ export class LTPlayerUpdate {
27
27
  updateVideo(videoUrl: string, poster: string) {
28
28
  const video = document.querySelector('video');
29
29
  video.poster = poster;
30
+ this.player.playerConfig.setPosterImage(poster);
31
+ this.player.posterManager.poster.setImage();
32
+ const coverImage = document.querySelector('.lt-player__poster__img--set-custom') as HTMLImageElement;
33
+ coverImage.src = poster;
34
+
30
35
  if (Hls.isSupported()) {
31
36
  this.player.hls.hlsInstance.detachMedia();
32
37
  this.player.hls.hlsInstance.loadSource(videoUrl);
@@ -144,6 +144,10 @@ export class LTPlayerConfig {
144
144
  return this.configData.posterImage;
145
145
  }
146
146
 
147
+ setPosterImage(image: string) {
148
+ this.configData.posterImage = image;
149
+ }
150
+
147
151
  getParagraph() {
148
152
  return this.configData.videoParagraph;
149
153
  }