@aarsteinmedia/dotlottie-player 6.2.2 → 6.2.4

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/light.d.ts CHANGED
@@ -1,26 +1,18 @@
1
- import { RendererType, PreserveAspectRatio, PlayMode } from '@aarsteinmedia/lottie-web/utils';
1
+ import { PlayMode, PreserveAspectRatio, RendererType } from '@aarsteinmedia/lottie-web/utils';
2
2
  export { PlayMode, PlayerEvents } from '@aarsteinmedia/lottie-web/utils';
3
3
  import * as _aarsteinmedia_lottie_web_light from '@aarsteinmedia/lottie-web/light';
4
- import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
5
- import { Vector2, AnimationConfiguration, AnimationData, AnimationDirection, AddAnimationParams, Result, ConvertParams, AnimationItem, LottieManifest, AnimationSettings } from '@aarsteinmedia/lottie-web';
6
- import { addAnimation, convert } from '@aarsteinmedia/lottie-web/dotlottie';
7
- import * as _aarsteinmedia_lottie_web_canvas from '@aarsteinmedia/lottie-web/canvas';
8
- import * as _aarsteinmedia_lottie_web_svg from '@aarsteinmedia/lottie-web/svg';
4
+ import { HTMLBooleanAttribute, AnimationData, AnimationDirection, AddAnimationParams, Result, ConvertParams, AnimationItem, LottieManifest, AnimationSettings, Vector2, AnimationConfiguration } from '@aarsteinmedia/lottie-web';
9
5
 
10
- declare class DotLottiePlayer extends DotLottiePlayerBase {
11
- addAnimation: typeof addAnimation;
12
- convert: typeof convert;
13
- loadAnimation: typeof _aarsteinmedia_lottie_web.loadAnimation;
14
- protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, rendererType }: {
15
- container?: HTMLElement;
16
- rendererType: RendererType;
17
- initialSegment?: Vector2;
18
- hasAutoplay: boolean;
19
- hasLoop: boolean;
20
- preserveAspectRatio: PreserveAspectRatio;
21
- }): AnimationConfiguration<RendererType>;
6
+ declare abstract class PropertyCallbackElement extends HTMLElement {
7
+ constructor();
8
+ connectedCallback(): void;
9
+ propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
22
10
  }
23
11
 
12
+ declare function renderControls(this: DotLottiePlayerBase): void;
13
+
14
+ declare function renderPlayer(this: DotLottiePlayerBase): Promise<void>;
15
+
24
16
  declare enum MouseOut {
25
17
  Pause = "pause",
26
18
  Reverse = "reverse",
@@ -39,83 +31,6 @@ declare enum PlayerState {
39
31
  }
40
32
  declare const tagName = "dotlottie-player";
41
33
 
42
- declare class DotLottiePlayerCanvas extends DotLottiePlayerBase {
43
- loadAnimation: typeof _aarsteinmedia_lottie_web_canvas.loadAnimation;
44
- get renderer(): RendererType;
45
- constructor();
46
- protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, }: {
47
- container?: HTMLElement;
48
- rendererType: RendererType;
49
- initialSegment?: Vector2;
50
- hasAutoplay: boolean;
51
- hasLoop: boolean;
52
- preserveAspectRatio: PreserveAspectRatio;
53
- }): AnimationConfiguration<RendererType.Canvas>;
54
- }
55
-
56
- declare class DotLottiePlayerSVG extends DotLottiePlayerBase {
57
- loadAnimation: typeof _aarsteinmedia_lottie_web_svg.loadAnimation;
58
- get renderer(): RendererType;
59
- constructor();
60
- protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, }: {
61
- container?: HTMLElement;
62
- rendererType: RendererType;
63
- initialSegment?: Vector2;
64
- hasAutoplay: boolean;
65
- hasLoop: boolean;
66
- preserveAspectRatio: PreserveAspectRatio;
67
- }): AnimationConfiguration<RendererType.SVG>;
68
- }
69
-
70
- type AnimateOnScroll = boolean | '' | null;
71
- type Autoplay = boolean | '' | 'autoplay' | null;
72
- type Controls = boolean | '' | 'controls' | null;
73
- type Loop = boolean | '' | 'loop' | null;
74
- type Subframe = boolean | '' | null;
75
- declare global {
76
- interface HTMLElementTagNameMap {
77
- [tagName]: DotLottiePlayer | DotLottiePlayerLight;
78
- }
79
- function dotLottiePlayer(): DotLottiePlayer | DotLottiePlayerLight | DotLottiePlayerSVG | DotLottiePlayerCanvas;
80
- }
81
- type JSXLottiePlayer = Omit<Partial<DotLottiePlayer | DotLottiePlayerLight>, 'style'> & {
82
- class?: string;
83
- ref?: React.RefObject<unknown>;
84
- style?: React.CSSProperties;
85
- src: string;
86
- };
87
- declare module 'react' {
88
- namespace JSX {
89
- interface IntrinsicElements {
90
- [tagName]: JSXLottiePlayer;
91
- }
92
- }
93
- }
94
- declare module 'react/jsx-runtime' {
95
- namespace JSX {
96
- interface IntrinsicElements {
97
- [tagName]: JSXLottiePlayer;
98
- }
99
- }
100
- }
101
- declare module 'react/jsx-dev-runtime' {
102
- namespace JSX {
103
- interface IntrinsicElements {
104
- [tagName]: JSXLottiePlayer;
105
- }
106
- }
107
- }
108
-
109
- declare abstract class PropertyCallbackElement extends HTMLElement {
110
- constructor();
111
- connectedCallback(): void;
112
- propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
113
- }
114
-
115
- declare function renderControls(this: DotLottiePlayerBase): void;
116
-
117
- declare function renderPlayer(this: DotLottiePlayerBase): Promise<void>;
118
-
119
34
  declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
120
35
  static get observedAttributes(): readonly ["animateOnScroll", "autoplay", "controls", "direction", "hover", "loop", "mode", "playOnClick", "playOnVisible", "selector", "speed", "src", "subframe"];
121
36
  static get observedProperties(): string[];
@@ -125,15 +40,15 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
125
40
  shadow: ShadowRoot | undefined;
126
41
  source?: string;
127
42
  template?: HTMLTemplateElement;
128
- set animateOnScroll(value: AnimateOnScroll);
129
- get animateOnScroll(): AnimateOnScroll;
43
+ set animateOnScroll(value: HTMLBooleanAttribute);
44
+ get animateOnScroll(): HTMLBooleanAttribute;
130
45
  get animations(): AnimationData[];
131
- set autoplay(value: Autoplay);
132
- get autoplay(): Autoplay;
46
+ set autoplay(value: HTMLBooleanAttribute);
47
+ get autoplay(): HTMLBooleanAttribute;
133
48
  set background(value: string);
134
49
  get background(): string;
135
- set controls(value: Controls);
136
- get controls(): Controls;
50
+ set controls(value: HTMLBooleanAttribute);
51
+ get controls(): HTMLBooleanAttribute;
137
52
  set count(value: number);
138
53
  get count(): number;
139
54
  get currentAnimation(): number;
@@ -143,41 +58,41 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
143
58
  get description(): string | null;
144
59
  set direction(value: AnimationDirection);
145
60
  get direction(): AnimationDirection;
146
- set dontFreezeOnBlur(value: boolean);
147
- get dontFreezeOnBlur(): boolean;
148
- set hover(value: boolean);
149
- get hover(): boolean;
61
+ set dontFreezeOnBlur(value: HTMLBooleanAttribute);
62
+ get dontFreezeOnBlur(): HTMLBooleanAttribute;
63
+ set hover(value: HTMLBooleanAttribute);
64
+ get hover(): HTMLBooleanAttribute;
150
65
  set intermission(value: number);
151
66
  get intermission(): number;
152
67
  get isDotLottie(): boolean;
153
- set loop(value: Loop);
154
- get loop(): Loop;
68
+ set loop(value: HTMLBooleanAttribute);
69
+ get loop(): HTMLBooleanAttribute;
155
70
  set mode(value: PlayMode);
156
71
  get mode(): PlayMode;
157
72
  set mouseout(value: MouseOut);
158
73
  get mouseout(): MouseOut;
159
74
  set objectfit(value: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down');
160
75
  get objectfit(): "contain" | "cover" | "fill" | "none" | "scale-down";
161
- set once(value: boolean);
162
- get once(): boolean;
163
- set playOnClick(value: boolean);
164
- get playOnClick(): boolean;
165
- set playOnVisible(value: boolean);
166
- get playOnVisible(): boolean;
76
+ set once(value: HTMLBooleanAttribute);
77
+ get once(): HTMLBooleanAttribute;
78
+ set playOnClick(value: HTMLBooleanAttribute);
79
+ get playOnClick(): HTMLBooleanAttribute;
80
+ set playOnVisible(value: HTMLBooleanAttribute);
81
+ get playOnVisible(): HTMLBooleanAttribute;
167
82
  set preserveAspectRatio(value: PreserveAspectRatio | null);
168
83
  get preserveAspectRatio(): PreserveAspectRatio | null;
169
84
  set renderer(value: RendererType);
170
85
  get renderer(): RendererType;
171
86
  set selector(value: string | null);
172
87
  get selector(): string | null;
173
- set simple(value: boolean);
174
- get simple(): boolean;
88
+ set simple(value: HTMLBooleanAttribute);
89
+ get simple(): HTMLBooleanAttribute;
175
90
  set speed(value: number);
176
91
  get speed(): number;
177
92
  set src(value: string | null);
178
93
  get src(): string | null;
179
- set subframe(value: Subframe);
180
- get subframe(): Subframe;
94
+ set subframe(value: HTMLBooleanAttribute);
95
+ get subframe(): HTMLBooleanAttribute;
181
96
  protected _container: HTMLElement | null;
182
97
  protected _errorMessage: string;
183
98
  protected _identifier: string;
package/dist/light.js CHANGED
@@ -444,7 +444,7 @@ const notImplemented = 'Method is not implemented';
444
444
  /**
445
445
  * Whether to freeze animation when window loses focus.
446
446
  */ set dontFreezeOnBlur(value) {
447
- this.setAttribute('dontFreezeOnBlur', value.toString());
447
+ this.setAttribute('dontFreezeOnBlur', Boolean(value).toString());
448
448
  }
449
449
  get dontFreezeOnBlur() {
450
450
  const val = this.getAttribute('dontFreezeOnBlur');
@@ -453,7 +453,7 @@ const notImplemented = 'Method is not implemented';
453
453
  /**
454
454
  * Whether to play on mouseover.
455
455
  */ set hover(value) {
456
- this.setAttribute('hover', value.toString());
456
+ this.setAttribute('hover', Boolean(value).toString());
457
457
  }
458
458
  get hover() {
459
459
  const val = this.getAttribute('hover');
@@ -531,7 +531,7 @@ const notImplemented = 'Method is not implemented';
531
531
  * Whether to play once or reset,
532
532
  * if playOnVisible is true.
533
533
  */ set once(value) {
534
- this.setAttribute('once', value.toString());
534
+ this.setAttribute('once', Boolean(value).toString());
535
535
  }
536
536
  get once() {
537
537
  const val = this.getAttribute('once');
@@ -540,7 +540,7 @@ const notImplemented = 'Method is not implemented';
540
540
  /**
541
541
  * Whether to toggle play on click.
542
542
  */ set playOnClick(value) {
543
- this.setAttribute('playOnClick', value.toString());
543
+ this.setAttribute('playOnClick', Boolean(value).toString());
544
544
  }
545
545
  get playOnClick() {
546
546
  const val = this.getAttribute('playOnClick');
@@ -549,7 +549,7 @@ const notImplemented = 'Method is not implemented';
549
549
  /**
550
550
  * Play when visible.
551
551
  */ set playOnVisible(value) {
552
- this.setAttribute('playOnVisible', value.toString());
552
+ this.setAttribute('playOnVisible', Boolean(value).toString());
553
553
  }
554
554
  get playOnVisible() {
555
555
  const val = this.getAttribute('playOnVisible');
@@ -594,7 +594,7 @@ const notImplemented = 'Method is not implemented';
594
594
  /**
595
595
  * Hide advanced controls.
596
596
  */ set simple(value) {
597
- this.setAttribute('simple', value.toString());
597
+ this.setAttribute('simple', Boolean(value).toString());
598
598
  }
599
599
  get simple() {
600
600
  const val = this.getAttribute('simple');
package/dist/svg.d.ts CHANGED
@@ -1,40 +1,18 @@
1
- import { RendererType, PreserveAspectRatio, PlayMode } from '@aarsteinmedia/lottie-web/utils';
1
+ import { PlayMode, PreserveAspectRatio, RendererType } from '@aarsteinmedia/lottie-web/utils';
2
2
  export { PlayMode, PlayerEvents } from '@aarsteinmedia/lottie-web/utils';
3
3
  import * as _aarsteinmedia_lottie_web_svg from '@aarsteinmedia/lottie-web/svg';
4
- import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
5
- import { Vector2, AnimationConfiguration, AnimationData, AnimationDirection, AddAnimationParams, Result, ConvertParams, AnimationItem, LottieManifest, AnimationSettings } from '@aarsteinmedia/lottie-web';
6
- import { addAnimation, convert } from '@aarsteinmedia/lottie-web/dotlottie';
7
- import * as _aarsteinmedia_lottie_web_light from '@aarsteinmedia/lottie-web/light';
8
- import * as _aarsteinmedia_lottie_web_canvas from '@aarsteinmedia/lottie-web/canvas';
4
+ import { HTMLBooleanAttribute, AnimationData, AnimationDirection, AddAnimationParams, Result, ConvertParams, AnimationItem, LottieManifest, AnimationSettings, Vector2, AnimationConfiguration } from '@aarsteinmedia/lottie-web';
9
5
 
10
- declare class DotLottiePlayer extends DotLottiePlayerBase {
11
- addAnimation: typeof addAnimation;
12
- convert: typeof convert;
13
- loadAnimation: typeof _aarsteinmedia_lottie_web.loadAnimation;
14
- protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, rendererType }: {
15
- container?: HTMLElement;
16
- rendererType: RendererType;
17
- initialSegment?: Vector2;
18
- hasAutoplay: boolean;
19
- hasLoop: boolean;
20
- preserveAspectRatio: PreserveAspectRatio;
21
- }): AnimationConfiguration<RendererType>;
22
- }
23
-
24
- declare class DotLottiePlayerLight extends DotLottiePlayerBase {
25
- loadAnimation: typeof _aarsteinmedia_lottie_web_light.loadAnimation;
26
- get renderer(): RendererType;
6
+ declare abstract class PropertyCallbackElement extends HTMLElement {
27
7
  constructor();
28
- protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, }: {
29
- container?: HTMLElement;
30
- rendererType: RendererType;
31
- initialSegment?: Vector2;
32
- hasAutoplay: boolean;
33
- hasLoop: boolean;
34
- preserveAspectRatio: PreserveAspectRatio;
35
- }): AnimationConfiguration<RendererType.SVG>;
8
+ connectedCallback(): void;
9
+ propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
36
10
  }
37
11
 
12
+ declare function renderControls(this: DotLottiePlayerBase): void;
13
+
14
+ declare function renderPlayer(this: DotLottiePlayerBase): Promise<void>;
15
+
38
16
  declare enum MouseOut {
39
17
  Pause = "pause",
40
18
  Reverse = "reverse",
@@ -53,69 +31,6 @@ declare enum PlayerState {
53
31
  }
54
32
  declare const tagName = "dotlottie-player";
55
33
 
56
- declare class DotLottiePlayerCanvas extends DotLottiePlayerBase {
57
- loadAnimation: typeof _aarsteinmedia_lottie_web_canvas.loadAnimation;
58
- get renderer(): RendererType;
59
- constructor();
60
- protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, }: {
61
- container?: HTMLElement;
62
- rendererType: RendererType;
63
- initialSegment?: Vector2;
64
- hasAutoplay: boolean;
65
- hasLoop: boolean;
66
- preserveAspectRatio: PreserveAspectRatio;
67
- }): AnimationConfiguration<RendererType.Canvas>;
68
- }
69
-
70
- type AnimateOnScroll = boolean | '' | null;
71
- type Autoplay = boolean | '' | 'autoplay' | null;
72
- type Controls = boolean | '' | 'controls' | null;
73
- type Loop = boolean | '' | 'loop' | null;
74
- type Subframe = boolean | '' | null;
75
- declare global {
76
- interface HTMLElementTagNameMap {
77
- [tagName]: DotLottiePlayer | DotLottiePlayerLight;
78
- }
79
- function dotLottiePlayer(): DotLottiePlayer | DotLottiePlayerLight | DotLottiePlayerSVG | DotLottiePlayerCanvas;
80
- }
81
- type JSXLottiePlayer = Omit<Partial<DotLottiePlayer | DotLottiePlayerLight>, 'style'> & {
82
- class?: string;
83
- ref?: React.RefObject<unknown>;
84
- style?: React.CSSProperties;
85
- src: string;
86
- };
87
- declare module 'react' {
88
- namespace JSX {
89
- interface IntrinsicElements {
90
- [tagName]: JSXLottiePlayer;
91
- }
92
- }
93
- }
94
- declare module 'react/jsx-runtime' {
95
- namespace JSX {
96
- interface IntrinsicElements {
97
- [tagName]: JSXLottiePlayer;
98
- }
99
- }
100
- }
101
- declare module 'react/jsx-dev-runtime' {
102
- namespace JSX {
103
- interface IntrinsicElements {
104
- [tagName]: JSXLottiePlayer;
105
- }
106
- }
107
- }
108
-
109
- declare abstract class PropertyCallbackElement extends HTMLElement {
110
- constructor();
111
- connectedCallback(): void;
112
- propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
113
- }
114
-
115
- declare function renderControls(this: DotLottiePlayerBase): void;
116
-
117
- declare function renderPlayer(this: DotLottiePlayerBase): Promise<void>;
118
-
119
34
  declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
120
35
  static get observedAttributes(): readonly ["animateOnScroll", "autoplay", "controls", "direction", "hover", "loop", "mode", "playOnClick", "playOnVisible", "selector", "speed", "src", "subframe"];
121
36
  static get observedProperties(): string[];
@@ -125,15 +40,15 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
125
40
  shadow: ShadowRoot | undefined;
126
41
  source?: string;
127
42
  template?: HTMLTemplateElement;
128
- set animateOnScroll(value: AnimateOnScroll);
129
- get animateOnScroll(): AnimateOnScroll;
43
+ set animateOnScroll(value: HTMLBooleanAttribute);
44
+ get animateOnScroll(): HTMLBooleanAttribute;
130
45
  get animations(): AnimationData[];
131
- set autoplay(value: Autoplay);
132
- get autoplay(): Autoplay;
46
+ set autoplay(value: HTMLBooleanAttribute);
47
+ get autoplay(): HTMLBooleanAttribute;
133
48
  set background(value: string);
134
49
  get background(): string;
135
- set controls(value: Controls);
136
- get controls(): Controls;
50
+ set controls(value: HTMLBooleanAttribute);
51
+ get controls(): HTMLBooleanAttribute;
137
52
  set count(value: number);
138
53
  get count(): number;
139
54
  get currentAnimation(): number;
@@ -143,41 +58,41 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
143
58
  get description(): string | null;
144
59
  set direction(value: AnimationDirection);
145
60
  get direction(): AnimationDirection;
146
- set dontFreezeOnBlur(value: boolean);
147
- get dontFreezeOnBlur(): boolean;
148
- set hover(value: boolean);
149
- get hover(): boolean;
61
+ set dontFreezeOnBlur(value: HTMLBooleanAttribute);
62
+ get dontFreezeOnBlur(): HTMLBooleanAttribute;
63
+ set hover(value: HTMLBooleanAttribute);
64
+ get hover(): HTMLBooleanAttribute;
150
65
  set intermission(value: number);
151
66
  get intermission(): number;
152
67
  get isDotLottie(): boolean;
153
- set loop(value: Loop);
154
- get loop(): Loop;
68
+ set loop(value: HTMLBooleanAttribute);
69
+ get loop(): HTMLBooleanAttribute;
155
70
  set mode(value: PlayMode);
156
71
  get mode(): PlayMode;
157
72
  set mouseout(value: MouseOut);
158
73
  get mouseout(): MouseOut;
159
74
  set objectfit(value: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down');
160
75
  get objectfit(): "contain" | "cover" | "fill" | "none" | "scale-down";
161
- set once(value: boolean);
162
- get once(): boolean;
163
- set playOnClick(value: boolean);
164
- get playOnClick(): boolean;
165
- set playOnVisible(value: boolean);
166
- get playOnVisible(): boolean;
76
+ set once(value: HTMLBooleanAttribute);
77
+ get once(): HTMLBooleanAttribute;
78
+ set playOnClick(value: HTMLBooleanAttribute);
79
+ get playOnClick(): HTMLBooleanAttribute;
80
+ set playOnVisible(value: HTMLBooleanAttribute);
81
+ get playOnVisible(): HTMLBooleanAttribute;
167
82
  set preserveAspectRatio(value: PreserveAspectRatio | null);
168
83
  get preserveAspectRatio(): PreserveAspectRatio | null;
169
84
  set renderer(value: RendererType);
170
85
  get renderer(): RendererType;
171
86
  set selector(value: string | null);
172
87
  get selector(): string | null;
173
- set simple(value: boolean);
174
- get simple(): boolean;
88
+ set simple(value: HTMLBooleanAttribute);
89
+ get simple(): HTMLBooleanAttribute;
175
90
  set speed(value: number);
176
91
  get speed(): number;
177
92
  set src(value: string | null);
178
93
  get src(): string | null;
179
- set subframe(value: Subframe);
180
- get subframe(): Subframe;
94
+ set subframe(value: HTMLBooleanAttribute);
95
+ get subframe(): HTMLBooleanAttribute;
181
96
  protected _container: HTMLElement | null;
182
97
  protected _errorMessage: string;
183
98
  protected _identifier: string;
package/dist/svg.js CHANGED
@@ -444,7 +444,7 @@ const notImplemented = 'Method is not implemented';
444
444
  /**
445
445
  * Whether to freeze animation when window loses focus.
446
446
  */ set dontFreezeOnBlur(value) {
447
- this.setAttribute('dontFreezeOnBlur', value.toString());
447
+ this.setAttribute('dontFreezeOnBlur', Boolean(value).toString());
448
448
  }
449
449
  get dontFreezeOnBlur() {
450
450
  const val = this.getAttribute('dontFreezeOnBlur');
@@ -453,7 +453,7 @@ const notImplemented = 'Method is not implemented';
453
453
  /**
454
454
  * Whether to play on mouseover.
455
455
  */ set hover(value) {
456
- this.setAttribute('hover', value.toString());
456
+ this.setAttribute('hover', Boolean(value).toString());
457
457
  }
458
458
  get hover() {
459
459
  const val = this.getAttribute('hover');
@@ -531,7 +531,7 @@ const notImplemented = 'Method is not implemented';
531
531
  * Whether to play once or reset,
532
532
  * if playOnVisible is true.
533
533
  */ set once(value) {
534
- this.setAttribute('once', value.toString());
534
+ this.setAttribute('once', Boolean(value).toString());
535
535
  }
536
536
  get once() {
537
537
  const val = this.getAttribute('once');
@@ -540,7 +540,7 @@ const notImplemented = 'Method is not implemented';
540
540
  /**
541
541
  * Whether to toggle play on click.
542
542
  */ set playOnClick(value) {
543
- this.setAttribute('playOnClick', value.toString());
543
+ this.setAttribute('playOnClick', Boolean(value).toString());
544
544
  }
545
545
  get playOnClick() {
546
546
  const val = this.getAttribute('playOnClick');
@@ -549,7 +549,7 @@ const notImplemented = 'Method is not implemented';
549
549
  /**
550
550
  * Play when visible.
551
551
  */ set playOnVisible(value) {
552
- this.setAttribute('playOnVisible', value.toString());
552
+ this.setAttribute('playOnVisible', Boolean(value).toString());
553
553
  }
554
554
  get playOnVisible() {
555
555
  const val = this.getAttribute('playOnVisible');
@@ -594,7 +594,7 @@ const notImplemented = 'Method is not implemented';
594
594
  /**
595
595
  * Hide advanced controls.
596
596
  */ set simple(value) {
597
- this.setAttribute('simple', value.toString());
597
+ this.setAttribute('simple', Boolean(value).toString());
598
598
  }
599
599
  get simple() {
600
600
  const val = this.getAttribute('simple');