mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-10 21:06:15 -08:00
Update index.js
This commit is contained in:
1 parent
18a3e88e62
commit
11525f2ee3
1 file changed
+4
-11
@@ -43,12 +43,7 @@ var art = new Artplayer({
|
||||
{
|
||||
html: `<img style="width: 100px" src="${url}/image/your-name.png">`,
|
||||
click: function() {
|
||||
art.destroy(true);
|
||||
art = new Artplayer({
|
||||
autoplay: true,
|
||||
container: '.artplayer-app',
|
||||
url: url + '/video/your-name.mp4',
|
||||
});
|
||||
console.info('You clicked on the custom layer');
|
||||
},
|
||||
style: {
|
||||
position: 'absolute',
|
||||
@@ -106,12 +101,10 @@ var art = new Artplayer({
|
||||
],
|
||||
controls: [
|
||||
{
|
||||
name: 'localVideo',
|
||||
position: 'right',
|
||||
html: 'OPEN',
|
||||
tooltip: 'Open Local Video',
|
||||
mounted: $preview => {
|
||||
art.plugins.localVideo.attach($preview);
|
||||
html: 'Custom Control',
|
||||
click: function() {
|
||||
console.info('You clicked on the custom control');
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user