@latest-thinking/lt-player 1.0.9-d → 1.0.9-e
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
|
@@ -5,6 +5,8 @@ import {ValidatorService} from "../services/ValidatorService";
|
|
|
5
5
|
import * as playerSchema from "../json-schema/player-config.json";
|
|
6
6
|
import {LTPLayerAddInfo} from "./addInfo/LTPlayerAddInfoManager";
|
|
7
7
|
import Plyr from "plyr";
|
|
8
|
+
import {LTPlayerDevMethode} from "./LTPlayerDevMethode";
|
|
9
|
+
import Player = LTPlayerDevMethode.Player;
|
|
8
10
|
|
|
9
11
|
export class LTPlayerSetup {
|
|
10
12
|
|
|
@@ -12,7 +14,19 @@ export class LTPlayerSetup {
|
|
|
12
14
|
|
|
13
15
|
checkIfPlayerExists(playerConfig?: playerConfigType): boolean
|
|
14
16
|
{
|
|
15
|
-
|
|
17
|
+
let response: boolean = false;
|
|
18
|
+
|
|
19
|
+
if (playerConfig.body.playerContainer instanceof HTMLElement) {
|
|
20
|
+
response = true;
|
|
21
|
+
if (window.Player !== undefined) {
|
|
22
|
+
window.Player.players.forEach(player => {
|
|
23
|
+
if (player.playerConfig.getPlayerElementContainer() === playerConfig.body.playerContainer) {
|
|
24
|
+
response = false;
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return response;
|
|
16
30
|
}
|
|
17
31
|
|
|
18
32
|
init(playerConfig?: playerConfigType): Promise<any> {
|