Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm following this tutorial on how to change html5 video controls layout. But when i go fullscreen mode, the controls goes back to default. Do anyone have an example on how i can change the layout in fullscreen mode?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
376 views
Welcome To Ask or Share your Answers For Others

1 Answer

Hide the native controls completely, in both normal and full-screen mode:

video::-webkit-media-controls-enclosure {
  display:none !important;
}

Set the z-index for the custom controls to be equal to or higher than 2147483647:

#video-controls {
  z-index: 2147483647;
}

Source: Hiding Native HTML5 Video Controls in Full-Screen Mode

Note: if you are following the tutorial, then you need to also set position of custom controls to make it visible:

#video-controls {
  z-index: 2147483647;
  position: absolute; /* top left corner, change it if you like */
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...