Default behavior for the html video element causes the video controls to appear at the end of playback. Is there a way to change that behavior so that the video controls remain hidden?
I'm assuming that there is an if statement in the source code that determines if the controls are visible if the video has ended.
I've tried removing the controls when the video ends, but then the controls aren't accessible at all.
player.addEventListener('ended', () => {
player.removeAttribute( 'controls' );
});
I've tried removing the controls and then setting the controls, but the controls still appear.
player.addEventListener('ended', () => {
player.removeAttribute( 'controls' );
player.setAttribute( 'controls', '' );
});
I've also tried just setting the controls to false, but that does the same as removing the attribute 'controls'.
player.addEventListener('ended', () => {
player.controls = false
});