@latest-thinking/lt-player 1.1.0-e → 1.1.0-g
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/LTPlayerDevMethode.ts +2 -3
- package/src/components/LTPlayerType.ts +5 -2
- package/src/components/LTPlayerUpdate.ts +39 -0
- package/src/views/additionalInfo.handlebars +18 -18
- package/src/views/template.handlebars +1 -1
package/package.json
CHANGED
|
@@ -23,9 +23,8 @@ export namespace LTPlayerDevMethode {
|
|
|
23
23
|
const playerContainer = this.player.elements.container;
|
|
24
24
|
|
|
25
25
|
if(isFirst) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
console.log(this.player.muted);
|
|
26
|
+
this.player.muted = true;
|
|
27
|
+
this.player.volume = 0;
|
|
29
28
|
this.settingsManager.setGlobalSettings();
|
|
30
29
|
}
|
|
31
30
|
|
|
@@ -10,6 +10,7 @@ import {LTPLayerAddInfo} from "./addInfo/LTPlayerAddInfoManager";
|
|
|
10
10
|
import {LTPlayerEvents} from "./events/LTPlayer";
|
|
11
11
|
import {Helper} from "../services/Helper";
|
|
12
12
|
import {LTPlayerHls} from "./LTPlayerHls";
|
|
13
|
+
import {LTPlayerUpdate} from "./LTPlayerUpdate";
|
|
13
14
|
|
|
14
15
|
export namespace LTPlayer {
|
|
15
16
|
|
|
@@ -19,6 +20,7 @@ export namespace LTPlayer {
|
|
|
19
20
|
export class PortraitType extends LTPlayerController implements TypeInterface {
|
|
20
21
|
|
|
21
22
|
pausedPlayer: Plyr;
|
|
23
|
+
updateManager: LTPlayerUpdate;
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* Create a new Player instance root element
|
|
@@ -52,6 +54,7 @@ export namespace LTPlayer {
|
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
this.setEvents();
|
|
57
|
+
this.updateManager = new LTPlayerUpdate(this);
|
|
55
58
|
|
|
56
59
|
return true;
|
|
57
60
|
}
|
|
@@ -156,8 +159,8 @@ export namespace LTPlayer {
|
|
|
156
159
|
}
|
|
157
160
|
}
|
|
158
161
|
|
|
159
|
-
play() {
|
|
160
|
-
this.devMethodePlayer.play();
|
|
162
|
+
play(isFirst?: boolean) {
|
|
163
|
+
this.devMethodePlayer.play(isFirst);
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
pause() {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {LTPlayer} from "./LTPlayerType";
|
|
2
|
+
import {defaultType} from "../global/types/ModuleTypes";
|
|
3
|
+
import {LTPLayerAddInfo} from "./addInfo/LTPlayerAddInfoManager";
|
|
4
|
+
import Hls from "hls.js";
|
|
5
|
+
|
|
6
|
+
export class LTPlayerUpdate {
|
|
7
|
+
|
|
8
|
+
player: LTPlayer.PortraitType;
|
|
9
|
+
additionalInfoService: LTPLayerAddInfo.Controller;
|
|
10
|
+
|
|
11
|
+
constructor(player: LTPlayer.PortraitType) {
|
|
12
|
+
this.player = player;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
updatePlayer(config: defaultType) {
|
|
16
|
+
this.updateSource(config.body.videoUrl);
|
|
17
|
+
this.updateTitle(config.body.videoParagraph);
|
|
18
|
+
this.player.additionalInfoService.setConfig(config.body.additionalInfo);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
updateSource(videoUrl: string) {
|
|
23
|
+
if (Hls.isSupported()) {
|
|
24
|
+
this.player.hls.hlsInstance.detachMedia();
|
|
25
|
+
this.player.hls.hlsInstance.loadSource(videoUrl);
|
|
26
|
+
this.player.hls.hlsInstance.attachMedia(document.querySelector('video'));
|
|
27
|
+
} else {
|
|
28
|
+
document.querySelector('video').src = videoUrl;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
updateTitle(title: string) {
|
|
33
|
+
console.log(title);
|
|
34
|
+
const titleHeader = document.querySelector('.poster-title');
|
|
35
|
+
console.log(titleHeader)
|
|
36
|
+
titleHeader.textContent = '';
|
|
37
|
+
titleHeader.textContent = title;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -19,22 +19,22 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
<div class="player-lt__mobile__modal-content">
|
|
21
21
|
{{#abstract}}
|
|
22
|
-
<h2>{{abstract.title}}</h2>
|
|
23
|
-
<p>{{abstract.description}}</p>
|
|
24
|
-
<p>{{abstract.videoDOI}}</p>
|
|
25
|
-
<p>{{abstract.videoCitation}}</p>
|
|
22
|
+
<h2>{{{abstract.title}}}</h2>
|
|
23
|
+
<p>{{{abstract.description}}}</p>
|
|
24
|
+
<p>{{{abstract.videoDOI}}}</p>
|
|
25
|
+
<p>{{{abstract.videoCitation}}}</p>
|
|
26
26
|
{{/abstract}}
|
|
27
27
|
|
|
28
28
|
{{#institution}}
|
|
29
|
-
<h2>{{institution.title}}</h2>
|
|
29
|
+
<h2>{{{institution.title}}}</h2>
|
|
30
30
|
<img src="{{institution.image}}" alt="image">
|
|
31
|
-
<p>{{institution.institutionName}}</p>
|
|
32
|
-
<p>{{institution.description}}</p>
|
|
31
|
+
<p>{{{institution.institutionName}}}</p>
|
|
32
|
+
<p>{{{institution.description}}}</p>
|
|
33
33
|
{{/institution}}
|
|
34
34
|
|
|
35
35
|
{{#bio}}
|
|
36
|
-
<h2>{{bio.title}}</h2>
|
|
37
|
-
<p>{{bio.description}}</p>
|
|
36
|
+
<h2>{{{bio.title}}}</h2>
|
|
37
|
+
<p>{{{bio.description}}}</p>
|
|
38
38
|
{{/bio}}
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
@@ -47,28 +47,28 @@
|
|
|
47
47
|
<span class="player-lt__close-button">×</span>
|
|
48
48
|
<div class="player-lt__modal-body">
|
|
49
49
|
{{#abstract}}
|
|
50
|
-
<h2>{{abstract.title}}</h2>
|
|
51
|
-
<p>{{abstract.description}}</p>
|
|
50
|
+
<h2>{{{abstract.title}}}</h2>
|
|
51
|
+
<p>{{{abstract.description}}}</p>
|
|
52
52
|
<hr>
|
|
53
53
|
<h3>Video DOI</h3>
|
|
54
|
-
<p>{{abstract.videoDOI}}</p>
|
|
54
|
+
<p>{{{abstract.videoDOI}}}</p>
|
|
55
55
|
<h3>Video Citation</h3>
|
|
56
|
-
<p>{{abstract.videoCitation}}</p>
|
|
56
|
+
<p>{{{abstract.videoCitation}}}</p>
|
|
57
57
|
{{/abstract}}
|
|
58
58
|
|
|
59
59
|
{{#institution}}
|
|
60
|
-
<h2>{{institution.title}}</h2>
|
|
60
|
+
<h2>{{{institution.title}}}</h2>
|
|
61
61
|
<div class="modal-flex">
|
|
62
62
|
<img src="{{institution.image}}" alt="image">
|
|
63
|
-
<h3>{{institution.institutionName}}</h3>
|
|
63
|
+
<h3>{{{institution.institutionName}}}</h3>
|
|
64
64
|
</div>
|
|
65
65
|
<hr>
|
|
66
|
-
<p>{{institution.description}}</p>
|
|
66
|
+
<p>{{{institution.description}}}</p>
|
|
67
67
|
{{/institution}}
|
|
68
68
|
|
|
69
69
|
{{#bio}}
|
|
70
|
-
<h2>{{bio.title}}</h2>
|
|
71
|
-
<p>{{bio.description}}</p>
|
|
70
|
+
<h2>{{{bio.title}}}</h2>
|
|
71
|
+
<p>{{{bio.description}}}</p>
|
|
72
72
|
{{/bio}}
|
|
73
73
|
</div>
|
|
74
74
|
</div>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
</div>
|
|
4
4
|
{{/embedded}}
|
|
5
5
|
{{#video}}
|
|
6
|
-
<video class="embed_player lt-player-wrapper" playsinline controls crossorigin preload="none">
|
|
6
|
+
<video class="embed_player lt-player-wrapper" playsinline muted controls crossorigin preload="none">
|
|
7
7
|
<source src="{{videoUrl.videoUrl}}"/>
|
|
8
8
|
{{#defaultConfig.captions}}
|
|
9
9
|
<track kind="captions" label="{{label}} captions" src="{{url}}" srclang="{{srclang}}" {{default}} />
|