Skip to content

NextJS obscure 'props' error #24

@lukedanielson

Description

@lukedanielson

Hi there. I've setup a simple test page with "next": "13.4.3" and "@jwplayer/jwplayer-react": "^1.1.2" and I am getting a weird 'props' error that I can't seem to trace. Here is my page.tsx

"use client";

//@ts-ignore
import JWPlayer from "@jwplayer/jwplayer-react";

export default function VideoPlayerTest() {
  const onVisualQuality = (visualQuality: any) => {
    console.log("onVisualQuality", visualQuality);
  };

  const onCaptionsChanged = (track: any) => {
    console.log("onCaptionsChanged", track);
  };

  const onFullscreen = (fullscreen: any) => {
    console.log("onFullscreen", fullscreen);
  };
  return (
    <div className="test">
      <h2>Start editing to see some magic happen!</h2>
      <JWPlayer
        file="https://cdn.jwplayer.com/manifests/z1CDugB3.m3u8"
        library="https://cdn.jwplayer.com/libraries/T5EQoSVW.js"
        onVisualQuality={onVisualQuality}
        onCaptionsChanged={onCaptionsChanged}
        onFullscreen={onFullscreen}
      />
    </div>
  );
}

The player loads and plays successfully, but I can't seem to track down what this 'props' error is in the console:

Screenshot 2023-06-01 at 12 44 40 AM

If I remove the //@ts-ignore on line 3, it gives the ts error: Could not find a declaration file for module '@jwplayer/jwplayer-react'.

I believe it is some sort of hydration error specific to NextJS, but it is marked as a client component with the "use client"; directive, so is only running client side.

Any and all help to point me in the right direction would be greatly appreciated! Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions