@aarsteinmedia/dotlottie-player 2.1.8 → 2.2.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.
package/dist/cjs/index.js CHANGED
@@ -38,7 +38,6 @@ exports.PlayerEvents = void 0;
38
38
  })(exports.PlayerEvents || (exports.PlayerEvents = {}));
39
39
  class CustomError extends Error {
40
40
  }
41
-
42
41
  const addExt = (ext, str)=>{
43
42
  if (!str) return;
44
43
  if (getExt(str)) {
@@ -300,7 +299,7 @@ const addExt = (ext, str)=>{
300
299
  };
301
300
 
302
301
  var name = "@aarsteinmedia/dotlottie-player";
303
- var version = "2.1.8";
302
+ var version = "2.2.0";
304
303
  var description = "Web Component for playing Lottie animations in your web app. Previously @johanaarstein/dotlottie-player";
305
304
  var exports$1 = {
306
305
  ".": {
@@ -431,13 +430,13 @@ function _ts_decorate(decorators, target, key, desc) {
431
430
  }
432
431
  class DotLottiePlayer extends lit.LitElement {
433
432
  _getOptions() {
434
- const preserveAspectRatio = this.preserveAspectRatio ?? (this.objectfit && aspectRatio(this.objectfit)), initialSegment = !this.segment || this.segment.some((val)=>val < 0) ? undefined : this.segment.every((val)=>val > 0) ? [
433
+ const preserveAspectRatio = this.preserveAspectRatio ?? (this.objectfit && aspectRatio(this.objectfit)), currentAnimation = this._manifest.animations[this._currentAnimation], loop = this.loop !== undefined ? !!this.loop : currentAnimation.loop !== undefined && !!currentAnimation.loop, autoplay = this.autoplay !== undefined ? !!this.autoplay : currentAnimation.autoplay !== undefined && !!currentAnimation.autoplay, initialSegment = !this.segment || this.segment.some((val)=>val < 0) ? undefined : this.segment.every((val)=>val > 0) ? [
435
434
  this.segment[0] - 1,
436
435
  this.segment[1] - 1
437
436
  ] : this.segment, options = {
438
437
  container: this.container,
439
- loop: !!this.loop,
440
- autoplay: !!this.autoplay,
438
+ loop,
439
+ autoplay,
441
440
  renderer: this.renderer,
442
441
  initialSegment,
443
442
  rendererSettings: {