@rive-app/canvas 2.15.3 → 2.15.5

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": "@rive-app/canvas",
3
- "version": "2.15.3",
3
+ "version": "2.15.5",
4
4
  "description": "Rive's canvas based web api.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
@@ -25,6 +25,7 @@
25
25
  "rive.js",
26
26
  "rive.js.map",
27
27
  "rive.wasm",
28
+ "rive_fallback.wasm",
28
29
  "rive.d.ts",
29
30
  "rive_advanced.mjs.d.ts"
30
31
  ],
package/rive.js CHANGED
@@ -736,7 +736,7 @@ function Ya(a, b) {
736
736
  return Xa(c, a, b);
737
737
  }));
738
738
  }
739
- var Za, $a, db = {429492:(a, b, c, d, e) => {
739
+ var Za, $a, db = {430124:(a, b, c, d, e) => {
740
740
  if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
741
741
  return 0;
742
742
  }
@@ -799,9 +799,9 @@ var Za, $a, db = {429492:(a, b, c, d, e) => {
799
799
  }
800
800
  window.h.Aa += 1;
801
801
  return 1;
802
- }, 431670:() => {
802
+ }, 432302:() => {
803
803
  "undefined" !== typeof window.h && (--window.h.Aa, 0 === window.h.Aa && delete window.h);
804
- }, 431834:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 431938:() => {
804
+ }, 432466:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 432570:() => {
805
805
  try {
806
806
  var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
807
807
  a.close();
@@ -809,7 +809,7 @@ var Za, $a, db = {429492:(a, b, c, d, e) => {
809
809
  } catch (c) {
810
810
  return 0;
811
811
  }
812
- }, 432109:(a, b, c, d, e, f) => {
812
+ }, 432741:(a, b, c, d, e, f) => {
813
813
  if ("undefined" === typeof window.h) {
814
814
  return -1;
815
815
  }
@@ -855,7 +855,7 @@ var Za, $a, db = {429492:(a, b, c, d, e) => {
855
855
  a == window.h.H.ya && g.Z.connect(g.I.destination);
856
856
  g.pb = f;
857
857
  return window.h.yc(g);
858
- }, 434986:a => window.h.ra(a).I.sampleRate, 435059:a => {
858
+ }, 435618:a => window.h.ra(a).I.sampleRate, 435691:a => {
859
859
  a = window.h.ra(a);
860
860
  void 0 !== a.Z && (a.Z.onaudioprocess = function() {
861
861
  }, a.Z.disconnect(), a.Z = void 0);
@@ -863,13 +863,13 @@ var Za, $a, db = {429492:(a, b, c, d, e) => {
863
863
  a.I.close();
864
864
  a.I = void 0;
865
865
  a.pb = void 0;
866
- }, 435459:a => {
866
+ }, 436091:a => {
867
867
  window.h.Cb(a);
868
- }, 435509:a => {
868
+ }, 436141:a => {
869
869
  a = window.h.ra(a);
870
870
  a.I.resume();
871
871
  a.state = window.h.ga.xb;
872
- }, 435648:a => {
872
+ }, 436280:a => {
873
873
  a = window.h.ra(a);
874
874
  a.I.suspend();
875
875
  a.state = window.h.ga.stopped;
@@ -3353,7 +3353,7 @@ Zd();
3353
3353
  /* 2 */
3354
3354
  /***/ ((module) => {
3355
3355
 
3356
- module.exports = JSON.parse('{"name":"@rive-app/canvas","version":"2.15.3","description":"Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
3356
+ module.exports = JSON.parse('{"name":"@rive-app/canvas","version":"2.15.5","description":"Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
3357
3357
 
3358
3358
  /***/ }),
3359
3359
  /* 3 */
@@ -3840,8 +3840,10 @@ var RuntimeLoader = /** @class */ (function () {
3840
3840
  }
3841
3841
  })
3842
3842
  .catch(function () {
3843
- // In case unpkg fails or goes down, we should try to load from jsdelivr
3844
- var backupJsdelivrUrl = "https://cdn.jsdelivr.net/npm/".concat(package_json__WEBPACK_IMPORTED_MODULE_1__.name, "@").concat(package_json__WEBPACK_IMPORTED_MODULE_1__.version, "/rive.wasm");
3843
+ // In case unpkg fails, or the wasm was not supported, we try to load the fallback module from jsdelivr.
3844
+ // This `rive_fallback.wasm` is compiled to support older architecture.
3845
+ // TODO: (Gordon): preemptively test browser support and load the correct wasm file. Then use jsdelvr only if unpkg fails.
3846
+ var backupJsdelivrUrl = "https://cdn.jsdelivr.net/npm/".concat(package_json__WEBPACK_IMPORTED_MODULE_1__.name, "@").concat(package_json__WEBPACK_IMPORTED_MODULE_1__.version, "/rive_fallback.wasm");
3845
3847
  if (RuntimeLoader.wasmURL.toLowerCase() !== backupJsdelivrUrl) {
3846
3848
  console.warn("Failed to load WASM from ".concat(RuntimeLoader.wasmURL, ", trying jsdelivr as a backup"));
3847
3849
  RuntimeLoader.setWasmUrl(backupJsdelivrUrl);