Skip to content
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

Fix: Not showing video ads when the PIP mode is enabled on iOS #3241

Merged
merged 2 commits into from
Sep 19, 2023
Merged

Conversation

lrusso
Copy link
Contributor

@lrusso lrusso commented Sep 17, 2023

Fix: Not showing video ads when the PIP mode is enabled on iOS.

According to the Google IMA SDK, you cannot show video ads when the PIP mode is enabled (
https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/picture_in_picture?hl=en#starting_ads).

@freeboub
Copy link
Collaborator

I understand the necessity of this change, but:

  • That would need to be useful to add comment in doc indicating this restriction
  • What would happen is application enable pip during playback ? during Ad or during source playback ?

@lrusso
Copy link
Contributor Author

lrusso commented Sep 19, 2023

Hi @freeboub

That would need to be useful to add comment in doc indicating this restriction

Yes, that would be a good thing, I could add that note to the documentation file that you think appropriate.

What would happen is application enable pip during playback ? during Ad or during source playback ?

There are two escenarios:

  1. If you are watching a video (in normal mode) and a video ad appears, the default video controls are going to be hidden, so you won't be able to enable or trigger the pip mode while you are watching the video ad.
  2. If you are watching a video (in normal mode) and a video ad appears, the default video controls are going to be hidden, but if you have custom controls, those should be hidden, because if your custom controls are still visible, the end user is going to be able to trigger the pip mode while watching a video ad.

Without this pr/fix, when you are watching a video and you enable the pip mode and you are watching your video on the floating pip window, and then a video ad shows up, that video ad (created by the Google IMA SDK) won't show up on the pip window. The video ad will show up in your app, where the video in normal mode supposed to be. That's why Google says that video ads cannot start while you are using the PIP mode.

@freeboub
Copy link
Collaborator

Thanks you for details !
Can you add 1 note in pip section https://github.com/react-native-video/react-native-video/blob/master/API.md#pictureinpicture and in ads section: near: $RNVideoUseGoogleIMA usage

Thank you

@lrusso
Copy link
Contributor Author

lrusso commented Sep 19, 2023

@freeboub I just added a note regarding the PIP mode on iOS to the API.md file

@freeboub freeboub merged commit 03306d9 into TheWidlarzGroup:master Sep 19, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants