I'm having an issue when I extend the progressControl object it also clones the slider, so there is currently two. Am I wrong in trying to approach this by extending progressControl or should I go about creating the element a different way?
this.player = videojs("id", videojsOptions);
var thePlayer = this.player;
videojs.TrimVideo = videojs.ProgressControl.extend({
init: function(player, options){
videojs.ProgressControl.call(this, player, options);
}
});
this.player.controlBar.progressControl.trimVideo = this.player.controlBar.progressControl.addChild(
new videojs.TrimVideo(thePlayer, {
el: videojs.Component.prototype.createEl(null, {
className: 'vjs-trim-start-button vjs-menu-button',
innerHTML: '<div style="">words and words</div>',
role: 'button'
})
})
);
When initialising a new progressControl it merges the children together, you have to explicitly set seekBar to false. So you would end up with something like