Got this error in my Nextjs App.
5734-7d20cb167a8dbd4f.js:1 TypeError: Cannot create property ‘metadata’ on boolean ‘true’
at new e (2723-75573e019eea807d.js:1:255807)
at e.buildModernUI (2723-75573e019eea807d.js:1:253430)
at e.buildDefaultUI (2723-75573e019eea807d.js:1:252959)
at 2723-75573e019eea807d.js:1:273153
at aW (fd9d1056-5524b1ed0f4887ec.js:1:73244)
at oe (fd9d1056-5524b1ed0f4887ec.js:1:84685)
at e (fd9d1056-5524b1ed0f4887ec.js:1:85827)
at e (fd9d1056-5524b1ed0f4887ec.js:1:86113)
at e (fd9d1056-5524b1ed0f4887ec.js:1:85814)
const config = {
key: process.env.NEXT_PUBLIC_BITMOVIN_KEY!,
playback: {
muted: autoplay ?? false,
autoplay: autoplay ?? false,
seeking: true,
pictureInPicture: false,
},
logs: {
level: LogLevel.DEBUG,
bitmovin: true,
},
ui: true,
style: {
aspectratio: isMobile ? “4:3” : “16:9”,
controls: true,
fullscreen: isMobile,
},
};
const handlePlayerRef = (player: PlayerAPI) => {
playerRef.current = player;
console.log(“Player initialized”, player);
if (player && !isPlaying && player.isPlaying()) {
player.pause();
}
player.on(PlayerEvent.Play, () => {});
player.on(PlayerEvent.Paused, () => {});
player.on(PlayerEvent.PlaybackFinished, () => {
player.seek(0);
});
};
const source = {
hls: media,
poster: poster,
};
return (
<div
ref={containerRef}
id={id}
style={{
position: “relative”,
maxWidth: “100%”,
height: height || “100%”,
background: “black”,
display: “flex”,
justifyContent: “center”,
flexDirection: “column”,
}}
>
);
}