@profitlich/template-toolkit 2.15.0 → 2.17.0

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.
@@ -87,19 +87,14 @@ export class MuxPlayer {
87
87
  player.setAttribute('data-autoplay', 'true');
88
88
  }
89
89
 
90
- player.setAttribute('data-playing', 'false');
91
-
92
- player.addEventListener('playing', () => {
93
- player.setAttribute('data-playing', 'true');
94
- });
95
- player.addEventListener('pause', () => {
96
- player.setAttribute('data-playing', 'pause');
97
- });
98
- player.addEventListener('ended', () => {
99
- player.setAttribute('data-playing', 'ended');
100
- });
90
+ const setPlaying = value => player.setAttribute('data-playing', value);
91
+
92
+ player.addEventListener('playing', () => setPlaying('true'));
93
+ player.addEventListener('pause', () => setPlaying('pause'));
94
+ player.addEventListener('ended', () => setPlaying('ended'));
101
95
 
102
96
  container.replaceWith(player);
97
+ setPlaying('false');
103
98
 
104
99
  if (this.#onPlayerCreated) {
105
100
  this.#onPlayerCreated(player, container);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profitlich/template-toolkit",
3
- "version": "2.15.0",
3
+ "version": "2.17.0",
4
4
  "description": "Shared SCSS layout system, JS utilities, components and build scripts for profitlich template repos",
5
5
  "type": "module",
6
6
  "exports": {