this https://github.com/videojs/video.js/issues/1070 no longer seems to work in the newest version. I've attempted to do it in a variety of ways and it always ends up breaking the player. Is this still supported and if so what is the correct usage?
The child lists have changed to arrays to make reordering consistent between browsers.
videojs.getComponent('ControlBar').prototype.options_ = {
loadEvent: 'play',
children: [
'playToggle',
'muteToggle',
'volumeControl',
'fullscreenToggle'
]
}
Forgot to change the example. :) It's updated now.
thanks for the quick reply. perhaps I'm a little thick or just tired but could you possibly give me and example options:{} that changes the order of the control bar? whenever I try and pass it in I end up not having a bigPlayButton because I don't specifically define that.
nm! sorted it out finally. Not sure what I was doing wrong before but I finally got the right combo. Thanks for your help.
The example is just the code example above. If you're having issues with it, could you share a jsbin example of what you're doing?
@heff Figured it out. The only way I could get it to work was by supplying object-styled members to the array (using the CDN -- haven't moved over to a full prod. attempt, yet):
children:
[
{name:'fullscreenToggle'},
{name:'playToggle'},
{name:'volumeControl'},
{name:'muteToggle'}
]
Interesting. That seems like a bug.
On Wed, Dec 2, 2015 at 12:07 PM, tneaves [email protected] wrote:
@heff https://github.com/heff Figured it out. The only way I could get
it to work was by supplying object-styled members to the array:
children: [
{name:'fullscreenToggle'},
{name:'playToggle'},
{name:'volumeControl'},
{name:'muteToggle'}
]—
Reply to this email directly or view it on GitHub
https://github.com/videojs/video.js/issues/2673#issuecomment-161417805.
It seems like this issue isn't resolved. Certain members won't display, either, like CurrentTimeDisplay or DurationDisplay
currentTimeDisplay and durationDisplay are already in the dom, just hidden via CSS. Just change those to display: block. Example
@mmcc does it work?
controlBar: {
volumePanel: {inline: false},
// fullscreenToggle: false,
children: [
"playToggle",
"progressControl",
"volumeMenuButton",
"currentTimeDisplay",
"timeDivider",
"durationDisplay",
]
}
@weituotian I'm not sure which part you're asking about, but if it's specifying the control bar's children, yes, confirmed it does work in VJS 7+.
as described above, we could set the order of the control bars, but,if you would set the order of currentTimeDisplay and durationDisplay,you could set the css style also,because the display attribute of them were set to none default.
thanks for @mmcc
Most helpful comment
currentTimeDisplayanddurationDisplayare already in the dom, just hidden via CSS. Just change those todisplay: block. Example