mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 00:56:16 -08:00
574 B
574 B
title, sidebar_position
| title | sidebar_position |
|---|---|
| Add button to the controls | 2 |
▶ Run Code
var time = 0;
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
controls: [
{
position: 'right',
html: '<button type="button">Click Me!</button>',
click: function (_, event) {
// The second parameter is an event object
time += 1;
event.target.innerText = 'You Click ' + time;
},
},
],
});