mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
构建demo
This commit is contained in:
1 parent
ca31357292
commit
b64d5d5744
5 files changed
+2819
-2698
No files matched your search
@@ -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);
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user