cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
8.9k stars 1.12k forks source link

Fix where onReady not firing because IOS doesn't load past metadata with autoplay off #1805

Open kozr opened 3 weeks ago

kozr commented 3 weeks ago

Bug Fix

There is a problem where the onReady function in react-player isn't being called on IOS when autoPlay is false. This is because IOS stops loading past metadata when autoplay is off (readyState remains at 1).

Also get rid of line 83 which seems like a duplicate?

Stackoverflow GitHub Livepeer PR

kozr commented 3 weeks ago

@luwes

luwes commented 3 weeks ago

thanks for the contribution but this needs some more investigation. If preload=none even loadedmetadata would not fire. I'll have to dig in when onReady is called in all players.