I would like to change the videojs v5 controls layout in order to make a full width progress bar, on top of the vjs-control-bar
area, similar to the pre-v5 player skin.
And here is the pre-v5 skin. Notice the full width progress bar:
How should I proceed? Is it necessary to modify the component structure tree within the ProgressControl
component or can it be done using CSS only, with the existing ProgressControl
component?
I noticed that I can put it on top by changing the vjs-progress-control
display
CSS property from flex
to block
, initial
or inline
but I can't set the width to 100% (other ProgressControl components width are still considered). I assume it is because the vjs-progress-control
is still in the flex flow of the container.
EDIT
I made some progress. I can achieve the desired effect by using the following CSS:
.vjs-progress-control {
position: absolute;
bottom: 26px; /* The height of the ControlBar minus 4px. */
left: 0;
right: 0;
width: 100%;
height: 10px; /* the height must be reduced from 30 to 10px in order to allow the buttons below (e.g. play) to be pushed */
}
.vjs-progress-holder {/* needed to have a real 100% width display. */
margin-left: 0px;
margin-right: 0px;
}
Unless one of you find a way to make it better, I will post this edit as accepted answer when it will be allowed.