Create a player for Next.js
    • PDF

    Create a player for Next.js

    • PDF

    Article Summary

    Available in Classic and VPC

    Applying a player for Next.js describes the example for applying and setting a player with Video Player Enhancement Web SDK JS.

    Note

    To implement the Next.js example, the following environment is required:

    • Next.js version: 13.2.4
    • React Version: 18.2.0 (react-dom version: 18.2.0)

    Understand features of Next.js

    Make sure to consider the Next.js’ features before applying the Video Player Enhancement service.
    In Next.js version 13, you should use "use client"; with a client component in the CSR manner since all components are subcomponents. You can view how to make a client component in the official Next.js website. The official website clearly distinguishes when to use a subcomponent from when to use a client component and guides you. See Rendering: Server and Client Components | Next.js.

    image.png

    Note

    You can use the features related to React after writing with a client component. When you enter 'use client' in the first line of the Next.js file, the file is regarded as a client component.

    Load a script using function

    In Next.js, you can apply the player by creating a client component and loading an external script.
    You can use the `






    </>
    )
    }


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.