Commit 2d76e144 authored by wildfirecode13's avatar wildfirecode13

1

parent 5bd8b75f
......@@ -38,10 +38,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSVGA = exports.loadSVGA = void 0;
var SVGA = require("svgaplayerweb");
var parser = new SVGA.Parser();
var svgaParser = new SVGA.Parser();
exports.loadSVGA = function (url) {
return new Promise(function (resolve, reject) {
parser.load(url, function (videoItem) {
svgaParser.load(url, function (videoItem) {
resolve(videoItem);
}, function (err) {
reject(err);
......@@ -59,7 +59,7 @@ exports.getSVGA = function (url, className, loops, clearsAfterStop) { return __a
if (loops)
svga.loops = loops;
if (clearsAfterStop)
svga.clearsAfterStop = true;
svga.clearsAfterStop = clearsAfterStop;
svga.setVideoItem(videoItem);
svga.startAnimation();
return [2 /*return*/, svga];
......
......@@ -18,7 +18,7 @@ export const getSVGA = async (url:string, className:string, loops:number, clears
if (loops)
svga.loops = loops;
if (clearsAfterStop)
svga.clearsAfterStop = true;
svga.clearsAfterStop = clearsAfterStop;
svga.setVideoItem(videoItem);
svga.startAnimation();
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