Skip to content

Commit

Permalink
fix: add support for player-only <source> tag (#284)
Browse files Browse the repository at this point in the history
fix #262
  • Loading branch information
luwes committed Aug 2, 2024
1 parent 118ec75 commit e1ed50f
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 115 deletions.
18 changes: 18 additions & 0 deletions examples/default-provider/app/(default)/source-tag/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Metadata } from 'next';
import Player from 'next-video/player';

export const metadata: Metadata = {
title: 'next-video - Player only',
};

export default function Page() {
return (
<>
<section>
<Player style={{ display: 'grid', width: '100%', aspectRatio: 1.9 }}>
<source src="/country-clouds" type="video/mp4" />
</Player>
</section>
</>
);
}
3 changes: 3 additions & 0 deletions examples/default-provider/app/sidebar-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export default function SidebarNav() {
<li>
<Link className={`link ${pathname === '/player-only' ? 'active' : ''}`} href="/player-only">Player only</Link>
</li>
<li>
<Link className={`link ${pathname === '/source-tag' ? 'active' : ''}`} href="/source-tag">Source tag</Link>
</li>
</ul>
</nav>
}
141 changes: 78 additions & 63 deletions examples/default-provider/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/default-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"next": "14.2.2",
"next": "14.2.5",
"next-video": "file:../..",
"open-props": "^1.7.3",
"react": "^18",
Expand Down
Binary file added examples/default-provider/public/country-clouds
Binary file not shown.
Loading

0 comments on commit e1ed50f

Please sign in to comment.