muxinc / next-video

The easiest way to add video in your Nextjs app.
https://next-video.dev
MIT License
853 stars 32 forks source link

addChapters missing from component. #267

Closed carlomahfouz closed 4 months ago

carlomahfouz commented 5 months ago
  function addChaptersToPlayer(playerEl) {
    playerEl.addChapters(chapters);
  }

<Video  
       onLoadedMetadata={({ target }) => { 
      addChaptersToPlayer(target);
      }}
      onChapterChange={({ target }) => { 
        setActiveChapter((target).activeChapter);
      }}
      ...
/>

Target Player is missing addChapters which should exist on mux-player-react or am I missing something?

luwes commented 4 months ago

this will be available in the latest release, when we get that published :s thanks for reporting!

carlomahfouz commented 4 months ago

Works perfectly now! Thanks 😄