Skip to content

Commit 67fadf6

Browse files
committed
fix(player): align video to center of provider container
closes #936
1 parent b3eb1f4 commit 67fadf6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

packages/react/src/hooks/use-player-query.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ import { PlayerQueryList } from 'vidstack/local';
1717
* const matches = usePlayerQuery("(width < 680) and (streamType: on-demand)");
1818
* ```
1919
*
20+
* You can also use media queries:
21+
*
22+
* ```ts
23+
* const matches = usePlayerQuery("@media (min-width: 300px)");
24+
* ```
25+
*
2026
* @docs {@link https://www.vidstack.io/docs/player/api/hooks/use-player-query}
2127
*/
2228
export function usePlayerQuery(query: string): boolean {

packages/vidstack/player/styles/base.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@
3535
*/
3636

3737
[data-media-provider] {
38+
display: flex;
3839
position: relative;
39-
display: block;
4040
box-sizing: border-box;
4141
}
4242

4343
:where([data-media-provider]) {
44+
align-items: center;
4445
width: 100%;
4546
}
4647

0 commit comments

Comments
 (0)