jwplayer/jwplayer — pull request #126 by haxxxton (2014-08-05 04:07:37+00:00)
Title: Add custom controlbar buttons

Allow users to add custom buttons to the controlbar in both the flash and html5 player.

Control Sections:
![custom-button-insertion-points](https://cloud.githubusercontent.com/assets/743105/3806822/09fc3568-1c55-11e4-8fa8-d681fe8d5350.jpg)
Added 4 sections (each with the option of up to 4 buttons)
Section 1: Between 'play' and 'prev'
Section 2: Between 'next' and 'elapsed'
Section 3: Between 'duration' and 'hd'
Section 4: Between 'cc' and 'mute'

````
onCustom10: function(){
console.log('custom button callback triggered');
}
````
The buttons fire Media callbacks via the API such that a user can add custom functionality in their settings declaration should the callback be fired. Given that the definition of the custom button function is defined in the settings declaration, the same security restrictions of the API apply.

````

````
Custom buttons follow standard display functionality in that they only appear should the skin declare their visual style. No errors are thrown and nothing happens if a button is clicked while visible but no callback is defined.