I try to play video use ReactPlayer and set the playing from state and get some error.
Here my code:
function App() {
const [playing, setPlaying] = useState("true");
return(
<ReactPlayer
playing={playing}
url={myvideo}
muted={muted}
onEnded={playNext}
/>
)}
This is the error:
0.chunk.js:31274 Warning: Failed prop type: Invalid prop
playing
of typestring
supplied toReactPlayer
, expectedboolean
.
Can someone explain to me why that is error, and how to fix it?