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
Teads: AutoplayDetection causes fullscreen video on WKWebView #11438
Comments
fwiw only Teads adapter uses this. One solution could be to disable Teads while the fix is pending. |
Hi @webberig, sorry for the trouble! I'm not sure why the video is displayed as the I would have been very happy to use a standard feature, unfortunately the getAutoplayPolicy is only available on Firefox :/ |
Hi again, I have failed to reproduce it locally using a WKWebView with a configuration that sets How is Prebid.js loaded? Do you have something else specific on your WKWebView? I'm trying to find a way to reproduce it so I can find a way to fix it |
@github-matthieu-wipliez does your cordova config support AllowInlineMediaPlayback for iOS? (https://cordova.apache.org/docs/en/3.2.0/guide/platforms/ios/config.html) It would appear the autoplay detection would be great, but is unsupported at this time on most browsers. If you check the doc link above I think there is a solution you could try in there? |
Hi @webberig, good news, I've managed to reproduce the bug! @whatadewitt I don't use Cordova, I'm directly testing in an iOS app using a WKWebView with a custom configuration. I had not set That being said, the Teads ad player appears to assume that I see several ways to fix this:
What do you think? |
Thanks for the efforts @github-matthieu-wipliez! It appears that the cordova ionic-webview has an undocumented configuration which allows us to set the It would be an improvement to prebid if you were able to detect that inline playback is allowed or not. Not just for the mock video, but for real ads too. Displaying ads in a fullscreen native player is probably not desirable ;-) |
Great! I have tried to see if there was a way to detect if the video plays inline or not, and it seems that it's only possible to do that after the video has started playing (so it's already playing in fullscreen). After discussing with my colleagues, our Teads player is only supposed to be used in an environment where |
Apologies @github-matthieu-wipliez I tagged you in my response where I should have tagged @webberig -- regardless, glad you are sorted :) |
@github-matthieu-wipliez we'll discuss in committee tomorrow. I'm not familiar enough with how often this may occur to weigh in |
Could the "autoplay detection" feature be optional to avoid this issue on current iOS APPs that does not have the proper configuration? |
Something I don't quite understand is that this feature has been part of the Teads ad player for years without any issues. Do you have the Teads adapter enabled by default but not configured? Is it playing any ads? |
We use the Teads adapter in our Prebid integration, but only with banner media types. After a recent upgrade of the Prebid version, this issue has appeared. It is related to the automatic "autoplay detection" recently added in Prebid.js/libraries/autoplayDetection/autoplay.js Lines 41 to 42 in 7ab6165
That code was not included in previous versions of the Teads adapter (I have looked for it in 8.36.0 version). About using the "Teads ad player", I am not sure about it. I don't know the resources used when Teads wins the auction and its creative is displayed. As I have commented, we only use the Teads adapter for banner media types. Thanks for your help! |
Discussed in the PMC, and we should also add this situation to our documentation as other bidders may also run into this problem. |
Type of issue
Bug
Description
We encountered some strange behavior in our mobile app after updating prebid.js. A full screen native media player appears with a black 1-second video.
20240430_upd_r200_ios_black_overlay.mp4
This is caused by the autoplay detection:
https://github.com/prebid/Prebid.js/blob/7ab6165e342294fafa087135af219f3f88f0e220/libraries/autoplayDetection/autoplay.js
The app is built using Cordova and Ionic which uses a WKWebView component to render the web application. Apparently, WKWebView has a property allowsInlineMediaPlayback which - when turned off - forces video content to be displayed in a native fullscreen controller.
This property is turned off by default on iPhone, turned on by default on iPad.
The autoplay detection of prebid.js plays a small video to determine wether autoplay is supported, which is invisible in most common browsers but seems to have a disturbing side effect in WKWebView.
Steps to reproduce
This can only be reproduced in a native iOS application using a WKWebView which in turn contains a webpage that is running prebid.js.
Test page
Providing a demo app has little use as you need to have XCode installed and run the app in Simulator. One does not simply install an app from unknown origin on iPhones ;-)
I'm hoping the WKWebView documentation is enough to prove the bug being presented.
Expected results
prebid.js should not bother a user with a fullscreen 1s black video. The current approach can be considered hacky at best, so I would recommend looking at proper feature detection such as this draft spec: https://www.w3.org/TR/autoplay-detection/
Actual results
As soon as prebid.js is loaded, the user gets a fullscreen 1s black video. After closing it (by swiping or a close button in a corner of the screen), normal behavior is resumed.
Platform details
Tested with prebid.js v8.45.0
Browser is a WKWebView inside a native iOS mobile app, built using XCode 15.3. According to docs, this property is present in iOS version >= 8.0
Other information
The text was updated successfully, but these errors were encountered: