napthedev / react-tuby

A React video player library with YouTube-like UI
https://react-tuby.vercel.app
MIT License
138 stars 43 forks source link

It doesn't work with next.js 14 #17

Open timomedia opened 7 months ago

timomedia commented 7 months ago

When I use nextjs 14, I get an error like the image below. And here is my code Please help me check it. Thank you very much!

'use-client'
import ReactHlsPlayer from "react-hls-player";
import { Player } from "react-tuby";
export default function Home() {
 return (
    <main className="flex min-h-screen flex-col items-center justify-between p-24">
     <Player src="https://live-par-2-cdn-alt.livepush.io/live/bigbuckbunnyclip/index.m3u8">
        {(ref, props) => <ReactHlsPlayer playerRef={ref} {...props} />}
    </Player>;
    </main>
  );
}

image