I want to create custom button in video js i have tried so many things and search alot when i am applying i found no result i think i have some mistake in my code.
i have setup my player on video js successfully.
This my code which i am trying to add custom button.
<script>
$(document).ready(function(){
var player = videojs('video1');
var myButton = player.controlBar.addChild('button', {
text: "Press me",
// other options
});
myButton.addClass("html-classname");
});
</script>
and i also tried this code to add button in player from video js component documentation.
<script>
$(document).ready(function(){
var player = videojs('video1');
var button = player.addChild('button');
button.el();
});
</script>
This is my codeOpen fiddle please correct in it what's i am doing wrong.