Commit 2d76e144 authored by wildfirecode13's avatar wildfirecode13

1

parent 5bd8b75f
...@@ -38,10 +38,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) { ...@@ -38,10 +38,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSVGA = exports.loadSVGA = void 0; exports.getSVGA = exports.loadSVGA = void 0;
var SVGA = require("svgaplayerweb"); var SVGA = require("svgaplayerweb");
var parser = new SVGA.Parser(); var svgaParser = new SVGA.Parser();
exports.loadSVGA = function (url) { exports.loadSVGA = function (url) {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
parser.load(url, function (videoItem) { svgaParser.load(url, function (videoItem) {
resolve(videoItem); resolve(videoItem);
}, function (err) { }, function (err) {
reject(err); reject(err);
...@@ -59,7 +59,7 @@ exports.getSVGA = function (url, className, loops, clearsAfterStop) { return __a ...@@ -59,7 +59,7 @@ exports.getSVGA = function (url, className, loops, clearsAfterStop) { return __a
if (loops) if (loops)
svga.loops = loops; svga.loops = loops;
if (clearsAfterStop) if (clearsAfterStop)
svga.clearsAfterStop = true; svga.clearsAfterStop = clearsAfterStop;
svga.setVideoItem(videoItem); svga.setVideoItem(videoItem);
svga.startAnimation(); svga.startAnimation();
return [2 /*return*/, svga]; return [2 /*return*/, svga];
......
...@@ -18,7 +18,7 @@ export const getSVGA = async (url:string, className:string, loops:number, clears ...@@ -18,7 +18,7 @@ export const getSVGA = async (url:string, className:string, loops:number, clears
if (loops) if (loops)
svga.loops = loops; svga.loops = loops;
if (clearsAfterStop) if (clearsAfterStop)
svga.clearsAfterStop = true; svga.clearsAfterStop = clearsAfterStop;
svga.setVideoItem(videoItem); svga.setVideoItem(videoItem);
svga.startAnimation(); svga.startAnimation();
return svga return svga
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment