Skip to content
Discussion options

You must be logged in to vote

Hi @pchr-srf, if you want to have only two available sizes, the simplest solution is to use only the tiny breakpoint for 0 to 200px, and the rest will be handled by the default state that will be applied when the vjs-layout-tiny class is not present, making the other vjs-layout-* classes unnecessary. An example:

const player = video('player', {
  responsive: true, // Enables breakpoint updates based on the player's size
  breakpoints: {
    tiny: 200
  }
});
/* Everything >= 201px */
.video-js {
  font-size: 20px;
}

/* Everything <= 200px */
.video-js.vjs-layout-tiny {
  font-size: 5px;
}

/* If you want to hide components when the tiny layout is activated */
.vjs-layout-tiny .vjs-subs-c…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pchr-srf
Comment options

Answer selected by pchr-srf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #9065 on August 01, 2025 10:45.