Skip to content

Commit

Permalink
fix(player): align video to center of provider container
Browse files Browse the repository at this point in the history
closes #936
  • Loading branch information
mihar-22 committed Oct 3, 2023
1 parent b3eb1f4 commit 67fadf6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/react/src/hooks/use-player-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ import { PlayerQueryList } from 'vidstack/local';
* const matches = usePlayerQuery("(width < 680) and (streamType: on-demand)");
* ```
*
* You can also use media queries:
*
* ```ts
* const matches = usePlayerQuery("@media (min-width: 300px)");
* ```
*
* @docs {@link https://www.vidstack.io/docs/player/api/hooks/use-player-query}
*/
export function usePlayerQuery(query: string): boolean {
Expand Down
3 changes: 2 additions & 1 deletion packages/vidstack/player/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@
*/

[data-media-provider] {
display: flex;
position: relative;
display: block;
box-sizing: border-box;
}

:where([data-media-provider]) {
align-items: center;
width: 100%;
}

Expand Down

0 comments on commit 67fadf6

Please sign in to comment.