Replies: 2 comments 3 replies
-
@Dacogetul currently the custom buttons are appended based on the position you set them using with the exception of the const player = new OpenPlayerJS('id', {
controls: {
left: [],
middle: ['time'],
right: ['levels', 'captions', 'settings', 'fullscreen'],
},
});
player.addControl({
id: 'previous',
icon: 'https://static.thenounproject.com/png/1372588-200.png',
title: 'Previous',
position: 'left',
click: () => // your operation for PREVIOUS
});
player.addControl({
id: 'play',
icon: 'https://static.thenounproject.com/png/1372588-200.png',
title: 'Play',
position: 'left',
click: () => // your operation for PLAY
});
player.addControl({
id: 'next',
icon: 'https://static.thenounproject.com/png/1372588-200.png',
title: 'Next',
position: 'left',
click: () => // your operation for NEXT
});
player.init(); I hope this helps you. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Dacogetul I integrated a new config element when adding a custom control: const player = new OpenPlayerJS('id', {
//... your config
});
player.addControl({
id: 'previous',
icon: 'https://static.thenounproject.com/png/1372588-200.png',
title: 'Previous',
position: 'left',
index: 0, // This is to prepend it in the `left` position
click: () => // your operation for PREVIOUS
});
player.addControl({
id: 'next',
icon: 'https://static.thenounproject.com/png/1372588-200.png',
title: 'Next',
position: 'left',
index: 2, // to append it after Play button
click: () => // your operation for NEXT
});
player.init(); This change hasn't been released yet, but if you are OK with it, I'll release it in the next few days. You can check this in the master branch. Thanks! |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is possible to add previous and next movie button before and after PLAY button ? How can i do that? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions