For one of my plugins I use this approach to insert a "previous" and "next" button on each side of the play/pause toggle.
-First we create/add the new controls to the control bar with addChild()
-I then use a function to find the location of the play button since that is my reference point
-Once I know the location of the play button I can insert the "previous" button before it
-Once I know the new location of the play button I can insert the "next" button after (before the next sibling) it.
this.playlist.advancePlaylistButton = this.controlBar.addChild('advancePlaylist');
this.playlist.regressPlaylistButton = this.controlBar.addChild('regressPlaylist');
var playToggleLocation = 0;
var playLocation = function() {
var controlBarChildren = this.controlBar.el().childNodes;
var loc = -1;
for ( var x = 0; x < controlBarChildren.length; x++ ) {
if ( controlBarChildren[x].className.indexOf('vjs-play-control') != -1) {
loc = x;
break;
}
}
return loc;
};
playToggleLocation = playLocation();
this.controlBar.el().insertBefore( this.playlist.regressPlaylistButton.el(), this.controlBar.el().childNodes[playToggleLocation] );
this.controlBar.el().insertBefore( this.playlist.advancePlaylistButton.el(), this.controlBar.el().childNodes[playToggleLocation+1] );