Skip to content

Commit

Permalink
site: add hls-video example url params
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Sep 21, 2024
1 parent f4adb76 commit 55c0187
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion examples/nextjs/app/hls-video/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ export const metadata: Metadata = {
title: 'HLS Video - Media Elements',
};

export default function Page() {
type PageProps = {
searchParams: {
autoplay: string;
muted: string;
preload: string;
};
};

export default function Page(props: PageProps) {
return (
<>
<section>
Expand All @@ -18,6 +26,9 @@ export default function Page() {
controls
crossOrigin=""
playsInline
autoPlay={props.searchParams?.autoplay}
muted={props.searchParams?.muted}
preload={props.searchParams?.preload}
suppressHydrationWarning
>
<track
Expand Down

0 comments on commit 55c0187

Please sign in to comment.