plyr-react ref.current.plyr.on is not a function
11:27 01 Mar 2022

I'm using react function component and plyr-react version 3.2.1.

getting error ref.current.plyr.on is not a function

In 3.1.0 and below version it's working fine

Stackblitz Link - https://stackblitz.com/edit/react-vv9haf

CODE

const PlayerView = () => {
const ref = useRef();
 useEffect(() => {
  ref.current.plyr.on("ended", (event) => {
  console.log("ended-event");
 })
}, [])

 return (
 
);
reactjs use-ref plyr.js