-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add onAdError event listener #3381
Conversation
code looks good, I just doubting on the added api. Can you also confirm you tried to build with IMA dependancy disabled ? |
Hi @freeboub! I didn't test without IMA dependencies, I just fixed the issues, I think we can add an error event to |
As I said in #3378 (comment) I use |
90d1ca7
to
7646868
Compare
No I really prefer small PRs! Thank you for the proposal! |
@avencat can you juste merge master branch please ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, can you add the new even in doc please ?
This adds an onAdError event listener so you can have ad errors when your ads fail to load. I managed to test it on Android by providing a fake url to adTagUrl, but not on
iOS
, I don't know how to trigger this event listener… I already use this listener on my project thanks to patch package but thought some people might find it useful so here it is! 😄To test this PR, you have to enable ads in your project, see:
https://react-native-video.github.io/react-native-video/component/props#adtagurl and iOS and Android parts of https://react-native-video.github.io/react-native-video/installation
buildScript.ext
section of yourandroid/build.gradle
file:Then, you should be able to do: