mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 01:21:20 -08:00
初始化gif插件
This commit is contained in:
1 parent
7fc370b6d9
commit
ca31357292
16 files changed
+3296
-3
No files matched your search
@@ -0,0 +1,34 @@
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
consola.creat({
|
||||
target: 'body',
|
||||
zIndex: 99,
|
||||
});
|
||||
|
||||
console.info('Welcome, if you like it, consider star it, thank you.');
|
||||
console.info('https://github.com/zhw2590582/ArtPlayer');
|
||||
|
||||
window.addEventListener('error', function(err) {
|
||||
console.error(err.message);
|
||||
});
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer',
|
||||
url: 'https://blog.zhw-island.com/assets-cdn/video/one-more-time-one-more-chance-480p.mp4',
|
||||
autoSize: true,
|
||||
controls: [
|
||||
{
|
||||
name: 'preview',
|
||||
position: 'right',
|
||||
html: '打开'
|
||||
},
|
||||
],
|
||||
plugins: [artplayerPluginGif]
|
||||
});
|
||||
|
||||
art.on('firstCanplay', () => {
|
||||
var preview = document.querySelector('.art-control-preview');
|
||||
art.plugins.localPreview.attach(preview);
|
||||
});
|
||||
})();
|
||||
Reference in new issue
Block a user