react-native-youtube-iframe icon indicating copy to clipboard operation
react-native-youtube-iframe copied to clipboard

Multiple player is not working on real iOS device

Open nohackjustnoobb opened this issue 4 years ago • 3 comments

I want to have multiple players playing at the same time. It works fine on the simulator. However, it doesn't work when I test on my real iOS device. While there is a player playing, if I play another, the previous one will pause or keep loading. It is the same no matter I am using the expo-cli or react-native-cli.

Is there any way that I can have multiple youtube players playing at the same time?

  • Device: iphone 11 (simulator), iphone Xr (real device)
  • OS + version: iOS 14.4 (Both simulator and real device)
  • react-native-youtube-iframe version: 1.4.1
  • react-native-webview version: 11.0.0

nohackjustnoobb avatar Mar 07 '21 13:03 nohackjustnoobb

unfortunately I don't have a real iphone to test this on 😭

can you try going into node_modules/react-native-youtube-iframe/src/PlayerScripts.js

and editing this exact line to have an explicit closing tag (</div>) https://github.com/LonelyCpp/react-native-youtube-iframe/blob/1ed92b576a8459f12e7f4eeb7fe9ffa64677f930/src/PlayerScripts.js#L138

LonelyCpp avatar Mar 07 '21 15:03 LonelyCpp

Thank you for replying. I have tried to add the closing tag. Unfortunately, the problem is still here and nothing changes. 😢

nohackjustnoobb avatar Mar 07 '21 15:03 nohackjustnoobb

I find that it works fine when it has only one player is playing sound and the others are muted. (This situation also happen in Flutter)

nohackjustnoobb avatar Oct 18 '21 11:10 nohackjustnoobb