
Editing controls on control bar.
Now that the control are HTML5 based, it would make sense that the ability to edit what controls are shown here exists. According to the API, it doesn't seem possible, but I'm sure that there must be a way...
Now that the control are HTML5 based, it would make sense that the ability to edit what controls are shown here exists. According to the API, it doesn't seem possible, but I'm sure that there must be a way...
The controls are now rendered using CSS, so you can edit what controls are shown via Javascript or a <style> tag. Please see the following documents for more help with CSS:
http://support.jwplayer.com/customer/portal/articles/1406968-using-jw-player-skins
http://support.jwplayer.com/customer/portal/articles/1412123-building-jw-player-skins
http://support.jwplayer.com/customer/portal/articles/2067702-skin-css-classes-reference-
Thanks, is there anyway to add a control instead of just hide existing ones?
I have created an example where I insert a logo into the control bar, so I guess you could use something similar to add a new control:
jwplayer().onReady(function(){
var myLogo = document.createElement(“div”);
myLogo.id = “myTestLogo”;
myLogo.setAttribute(‘style’,“color: red; padding-left: 5px; margin-right: 5px; margin-top: 10px; background-image: url(‘logo-red-small.png’);background-repeat: no-repeat;”);
myLogo.setAttribute(‘class’,‘jw-icon jw-icon-inline jw-button-color jw-reset jw-icon-logo’);
myLogo.setAttribute(‘onclick’,‘window.location=“http://jwplayer.com”’);
document.getElementsByClassName(‘jw-controlbar-right-group’)0.appendChild(myLogo);
});