@latest-thinking/lt-player 1.0.9-e → 1.1.0-a

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.0.9-e",
3
+ "version": "1.1.0-a",
4
4
  "description": "LT player.",
5
5
  "main": "dist/js/lt-player-main.js",
6
6
  "module": "dist/js/lt-player-main.js",
@@ -14,17 +14,9 @@ export class LTPlayerSetup {
14
14
 
15
15
  checkIfPlayerExists(playerConfig?: playerConfigType): boolean
16
16
  {
17
- let response: boolean = false;
18
-
17
+ let response = false;
19
18
  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
- }
19
+ response = !playerConfig.body.playerContainer.classList.contains('is-loaded');
28
20
  }
29
21
  return response;
30
22
  }
@@ -77,6 +69,7 @@ export class LTPlayerSetup {
77
69
  const playerContainer = playerConfig.body.playerContainer;
78
70
 
79
71
  playerContainer.classList.add(`lt-player`);
72
+ playerContainer.classList.add(`is-loaded`);
80
73
 
81
74
  this.setAdditionalInfo(playerConfig);
82
75