videojs.registerPlugin('VSP', function () { var player = this; addPlaybackButton = function () { var playbackRateMenuButton = new videojs.getComponent('PlaybackRateMenuButton'); var oldPlaybackRateMenuButton = player.controlBar.playbackRateMenuButton; var playbackRates = new playbackRateMenuButton(player, { playbackRates: [0.5, 1, 1.5, 2] }); player.controlBar.addChild(playbackRates); player.controlBar.el().insertBefore(playbackRates.el, oldPlaybackRateMenuButton.el); player.controlBar.removeChild(oldPlaybackRateMenuButton); }; player.on("ready", function() { addPlaybackButton(); }); });
Putting the data attribute on the
<video>
tag is deprecated by BrightCoveShould be replaced with something like