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

Ads hang until timeout on Android Chrome 53 #281

Closed
stoicbuddha opened this issue Sep 21, 2016 · 17 comments
Closed

Ads hang until timeout on Android Chrome 53 #281

stoicbuddha opened this issue Sep 21, 2016 · 17 comments

Comments

@stoicbuddha
Copy link

stoicbuddha commented Sep 21, 2016

Test page: https://dev.player.dotstudiopro.com/share/57be8615d66da81809a33855?targetelm=.player&companykey=57bdf792d66da8b744a33855&autostart=false

Ads play perfectly fine on iOS, including when autoplay is set to true (as long as it starts off muted). On Android Chrome 53, the first frame of the ad shows up and the ad player acts like it's going to do something. It does not.

If you press the pause button (on the ad player), then press play, the ad plays. If you have autoplay set, even those actions don't cause the ad to do anything.

Tested with Android Chrome 53 and iOS 10 with whatever version of Safari that entails.

@stoicbuddha stoicbuddha changed the title Ads hang until timeout on Chrome 53 Ads hang until timeout on Android Chrome 53 Sep 21, 2016
@shawnbuso
Copy link
Contributor

The IMA SDK is still working on supporting auto-play on mobile. Until then, you'll still need to call initializeAdDisplayContainer as the result of a user action to initialize the ad player.

@stoicbuddha
Copy link
Author

Is there an ETA on when that will be completed? Are there any workarounds?

@shawnbuso
Copy link
Contributor

I don't have any timelines to share as of now, and there aren't any workarounds that I now of. The issue is that the IMA SDK isn't using your player to play ads, it's using a different player layered on top of yours, and that player also needs to be set up for inline playback. That player isn't exposed outside of the SDK, so you don't have access to it to set it up for inline playback.

@stoicbuddha
Copy link
Author

Are there any updates on this issue? The closest thing to a workaround I've found for it is loading the ad and binding the actual playing of the ad to a 'touchend' on the window and/or player so that no matter where they touch on the screen, it'll play. I'd love a more elegant solution though.

What's kind of weird is that it works perfectly fine in iOS 10. Is it possibly inheriting something in Safari that it's not in Android Chrome?

@shawnbuso
Copy link
Contributor

Still no ETA unfortunately - we did add support for inline playback on Safari in the IMA SDK, and we're working on Chrome now.

@stoicbuddha
Copy link
Author

Understandable. For anybody who runs across this prior to the Chrome support being added, what I did was:

  1. player.ima.setContentWithAdTag() first, then player.ima.initializeAdDisplayContainer(). I have some other processes that I do after those, but I get it right up to the point where the ad is supposed to play (this is in Android Chrome only).
  2. Bound player.ima.startFromReadyCallback(); to $(window).one("touchend") and drew an overlay over the player (because loading the ad overlays the ad player on top of the player, making it impossible to press play) and bound a touchend event to that overlay, removing it after it is touched (and when the window is touched too).

I don't know if it's the proper way to do it, but it works for me, for the moment.

@sonicsoul
Copy link

Any news on this topic?

@shawnbuso
Copy link
Contributor

There's still no progress on this on our end - does @stoicbuddha's solution work for you in the interim?

@sonicsoul
Copy link

Yes, it does, I had to change a little bit more of my code but in the end it is what @stoicbuddha suggested. The main thing was initializing the AdDisplayContainer as a result of "touchstart" and startFromReadyCallback() as a result of "touchend". I am building a banner that opens up when the user scrolls into view, so its a bit tricky and different to the usual case of just opening a website with a player. For example, firing requestAds() must not happen if the user does not scroll enough. etc.. anyway, thank you for that great plugin! Would love to hear a solution from your side soon ;-)

@stoicbuddha
Copy link
Author

@shawnbuso I ended up not being able to go that direction because it only works for preroll ads, and is not really good for midrolls or postrolls, or even multiple preroll ads.

Is there somebody further up the chain that can be bugged about this? Ads not playing in Android is kind of a very large issue and we haven't seen movement on it in 4 months.

@shawnbuso
Copy link
Contributor

shawnbuso commented Jan 18, 2017

If I recall correctly the issue is not that ads don't play at all, just that they don't auto-play. Is that still correct? You should have no problem playing ads on Android as long as playback is initiated by a user action. We are actively working on adding auto-play support for mobile platforms to the SDK.

@stoicbuddha
Copy link
Author

Yes, it's just autoplay, as far as I'm aware. And awesome, thanks for the update!

@stoicbuddha
Copy link
Author

@shawnbuso I'm actually having issues with non-autoplay ads as well. It's possible that my implementation is wonky, but I have a couple of times where I have to call player.play() and of course, the browser won't have any of it. It all works fine in iOS, since we set up iOS as autoplay. Should I open another issue for this?

@shawnbuso
Copy link
Contributor

Yea let's open a new issue since this one seems to be autoplay-centric. Thanks!

@Sivitas
Copy link

Sivitas commented Mar 15, 2017

Has there been any updates to this or roadmap for when it will be resolved? Autoplay isn't working for me on both ios and android. Looking at the inspector on mobile, I see the playinline attribute on the video elements, but no autoplay nor muted attributes set.

@shawnbuso
Copy link
Contributor

Hi all - I'm cleaning up old issues marked as "IMA issue" - is this still an issue for you / are you still looking for a resolution here? I tried the original test page but it looks like it's no longer loading. Let me know!

@stoicbuddha
Copy link
Author

No, this is no longer an issue due to an update to the IMA SDK a month or two ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants