Closed leopku closed 1 year ago
A new project with react component throw Uncaught TypeError: Cannot set properties of undefined (setting 'playbackRate') while loading.
Uncaught TypeError: Cannot set properties of undefined (setting 'playbackRate')
Steps to reproduce the behavior:
import Player from "@oplayer/core"; import ReactPlayer, { Source } from "@oplayer/react"; import hls from "@oplayer/hls"; import ui from "@oplayer/ui"; import { useRef } from "react"; const plugins = [ ui(), hls(), ]; export default function OPlayer( { source = { src: "", poster: "" } }: { source: Source; }, ) { const player = useRef<Player>(null); return ( <ReactPlayer plugins={plugins} ref={player} aspectRatio={0} autoplay={false} source={source} /> ); }
An old project with same codes but old version of oplayer works fine.
"@oplayer/core": "^1.2.11", "@oplayer/hls": "^1.2.8", "@oplayer/react": "^1.2.5", "@oplayer/ui": "^1.2.17",
Please provide a minimal repository on GitHub.
Issues without a reproduction link are likely to stall.
off react strict mode
Got it.
Environment
🐛 Bug Report
A new project with react component throw
Uncaught TypeError: Cannot set properties of undefined (setting 'playbackRate')
while loading.To Reproduce
Steps to reproduce the behavior:
Expected behavior
An old project with same codes but old version of oplayer works fine.
Link to repl or repo (highly encouraged)
Please provide a minimal repository on GitHub.
Issues without a reproduction link are likely to stall.