luwes / cloudflare-video-element

A custom element for the Cloudflare player with an API that matches the <video> API
https://cloudflare-video-element.vercel.app
4 stars 1 forks source link

Using in Next.js / React / Typescript #6

Open ADTC opened 5 months ago

ADTC commented 5 months ago
  1. How do I use this in a Typescript project?

    • There are no types and npm i --save-dev @types/cloudflare-video-element yielded nothing.
  2. How do I import and use this in a React project?

    • Is it import CloudflareVideo from 'cloudflare-video-element'?
    • The project is based on Next.js, if that matters. However, I don't expect anything more than plain React compatibility.

Thank you for replying.