Update index.js

This commit is contained in:
Harvey Zack authored and GitHub committed 2019-11-24 17:25:47 +08:00
1 parent 18a3e88e62
commit 563e796098
1 file changed
+4 -11
+4 -11
View File
@@ -43,12 +43,7 @@ var art = new Artplayer({
{ {
html: `<img style="width: 100px" src="${url}/image/your-name.png">`, html: `<img style="width: 100px" src="${url}/image/your-name.png">`,
click: function() { click: function() {
art.destroy(true); console.info('You clicked on the custom layer');
art = new Artplayer({
autoplay: true,
container: '.artplayer-app',
url: url + '/video/your-name.mp4',
});
}, },
style: { style: {
position: 'absolute', position: 'absolute',
@@ -106,12 +101,10 @@ var art = new Artplayer({
], ],
controls: [ controls: [
{ {
name: 'localVideo',
position: 'right', position: 'right',
html: 'OPEN', html: 'Custom Control',
tooltip: 'Open Local Video', click: function() {
mounted: $preview => { console.info('You clicked on the custom control');
art.plugins.localVideo.attach($preview);
}, },
}, },
], ],