LonelyCpp / react-native-youtube-iframe

A wrapper of the Youtube-iframe API built for react native.
https://lonelycpp.github.io/react-native-youtube-iframe/
MIT License
613 stars 155 forks source link

How to prevent ads in the videos? #347

Closed felipej26 closed 3 months ago

felipej26 commented 3 months ago

Hi everyone,

Is there a way to use this library without showing ads? For some reason, ads are only appearing at the beginning of videos on Android devices, but not on iOS devices.

For example: <YoutubeIframe videoId="ZbZSe6N_BXs" height={200} />

divyanshkumarsharma commented 3 months ago

any one tried solving this?? I am also facing this issue

felipej26 commented 3 months ago

I found a workaround for this. I don't know if it's the best idea, but at least it fixes this.

I self-hosted on my website a static HTML using this iframe: https://lonelycpp.github.io/react-native-youtube-iframe/self-host-remote-source

And I am using this prop to use my page: https://lonelycpp.github.io/react-native-youtube-iframe/component-props#baseurloverride

In this way, the ads stopped showing on my apps. So, I am closing this issue.