I am currently working on hiding the gradient and timeline components of an HTML video player using jQuery or JavaScript.
Although I have successfully achieved this using CSS:
video::-webkit-media-controls-panel {
background-image: none !important;
filter: brightness(0);
}
video::-webkit-media-controls-timeline {
display: none;
}
However, I want to apply this CSS dynamically through JavaScript only after the video has a source. This way, I can include specific conditions.
I attempted the following approach, but unfortunately, it did not yield the desired results:
$('video::-webkit-media-controls-panel').css({
'background-image': 'none !important',
'filter': 'brightness(0)'
});
$('video::-webkit-media-controls-timeline').css({
'display': 'none'
});
If anyone has insight on how to make this functionality work correctly, please share your expertise!