构建demo

This commit is contained in:
Harvey Zack committed 2018-12-06 11:24:22 +08:00
1 parent ca31357292
commit b64d5d5744
5 files changed
+2819 -2698

No files matched your search

+17 -1
View File
@@ -1,9 +1,25 @@
import gifshot from 'gifshot';
function artplayerPluginGif(art) {
console.log(gifshot);
return {
name: 'artplayerPluginGif',
create(config = {}, callback) {
gifshot.createGIF(
{
...config,
video: [art.template.$video.src],
},
obj => {
if (!obj.error) {
if (callback) {
callback(obj.image);
}
} else {
console.log(obj.error);
}
},
);
},
};
}