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

In IOS it is throwing error "An error occurred please try again later"

Open Lekhrajk opened this issue 3 years ago • 8 comments

Describe the bug It is working fine for android devices same code I am using for iOS but after loading video thumbnail it throws error "an error occurred please try again later" I am trying to run it in IOS 11 simulator

Expected behavior It should play the video instead of throwing an error.

Screenshots Simulator Screen Shot - iPhone 11 - 2021-04-23 at 11 11 58

Smartphone (please complete the following information):

  • Device: [ iPhone11] simulator
  • OS + version: [ iOS 14.4]
  • react-native-youtube-iframe 2.0.1
  • react-native-webview 11.3.2

Lekhrajk avatar Apr 23 '21 18:04 Lekhrajk

you must be getting some error from the onError callback.

Can you check that?

LonelyCpp avatar Apr 23 '21 18:04 LonelyCpp

Yes I checked it ,It is showing HTML5_error

Lekhrajk avatar Apr 23 '21 20:04 Lekhrajk

Make sure you're using react-native-youtube-iframe and not react-native-youtube.

Html5 errors are usually due to the webview (safari in your case) throwing errors. Try it on a real device to make sure it's an emulator only issue. I can confirm that it works well on my ios emulator. (bigSur, xcode 12.5)

Maybe restarting the emulator / updating MacOS would also help.

LonelyCpp avatar Apr 24 '21 03:04 LonelyCpp

yes on real device also it is throwing error because app is live on App Store and I am using big Sur and Xcode latest version

Lekhrajk avatar Apr 24 '21 06:04 Lekhrajk

I think it is because YouTube doesn't allow copyrighted video to be played using iframe

aakashr143 avatar May 16 '21 10:05 aakashr143

I also encountered this problem

"react-native-youtube-iframe": "^2.2.2",

onError return information HTML5_ Error, it cannot be played normally in debug mode

suwu150 avatar Mar 15 '22 11:03 suwu150

Same, in version 2.2.2 still not working

"react-native-youtube-iframe": "^2.2.2",

danteallievi avatar Apr 05 '22 12:04 danteallievi

I think it is because YouTube doesn't allow copyrighted video to be played using iframe

No it plays on expo but not in react native cli

harnie2275 avatar Aug 31 '22 00:08 harnie2275