Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(player): more settings for default layout #1430

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bezumkin
Copy link

@bezumkin bezumkin commented Sep 16, 2024

Description:

I'm using the programmatic initialization of Vidstack with the default layout.

const player = await VidstackPlayer.create({
  target,
  src: {src: url, type: 'application/x-mpegurl'},
  viewType: 'video',
  layout: new VidstackPlayerLayout(layoutSettings),
  // etc...
})

I tried to make Vidstack to look more like regular video player with simple settings. And that is why I'm introducing some new settings for default layout.

The main setting is flatSettingsMenu allows you to get rid of nested menus.

Screenshot 2024-09-16 at 10 15 54

Then you can disable any features you don't want to see:

const layoutSettings: Partial<DefaultLayoutProps> = {
  flatSettingsMenu: true,
  noAudioGain: true,
  noAudioTracks: true,
  noCaptions: true,
  noAnnouncements: true,
  noKeyboardAnimations: true,
  noCaptionStyles: true,
  noMediaLoop: true,
  // other settings...
}

And here is the final result! I hope you like it.

Screenshot 2024-09-16 at 10 30 07

Ready?

Yes, it has already been working for thousands of users in a production for a couple of months.

P.S.

Thank you for the great player!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant