Amphtml: Brightcove player sometimes fails to honor pause requests

Created on 23 Feb 2016  路  14Comments  路  Source: ampproject/amphtml

The brightcove example does not seem to have this problem.

To repro

  1. Go to http://localhost:8000/max/cpt-amp.production.gannettdigital.com/story/80725680/?amp_js_v=3 on iphone or Chrome emulating iphone
  2. Click play on video
  3. Switch tab

The video does not stop playing, but it should. I've already verified that AMP is sending the message, so this must be player specific.

CC @mister-ben

Bug

All 14 comments

Do you have a URL other than localhost?

Does the player config have the script mentioned in the readme? It's this that listens for the message.

Ah, it could be they just need to include it.

URL is http://cpt-amp.production.gannettdigital.com/story/80725680/

http://localhost:8000/max/cpt-amp.production.gannettdigital.com/story/80725680/

Is our new fancy local proxy for debugging live docs with local JS.

Checked the player, it doesn't have the listener script.

@mister-ben is that a change the publisher need to do on brightcove dashboard or something? I am unclear from the linked docs exactly where including that script is referring to (admittedly I haven't used brightcove player before).

Is there a way to enforce that script is included always in amp-brightcrove players - maybe pass a parameter to the player iframe?

I agree with @mkhatib, it would be nice to find a way to always include this script for AMP. @mister-ben is there any option to do this that you could recommend?

Re-opening this, @mister-ben, without a way to guarantee that brightcove player is going to respect the pause command we'll be forced to unload the entire player with the upcoming change pause/unlayout #1637 change.

This will mean that users will lose track of where they were at in a brightcove video and be forced to replay the video from the start instead.

As @dvoytenko mentioned if there's a way to force the pause script to be included (by sending a param in the amp-brightcove code) in the player and not leave it up to the publisher that would be great.

We don't have a way to force publishers to configure the player to load scripts as that's a cusotmer choice. As documentation/education isn't working, I think the best way to handle this is I update the script to notify the amp-brightcove component that it is present via postmessage. The player can be paused if so and only unloaded id not. Does that sound reasonable?

The player can be paused if so and only unloaded id not. Does that sound reasonable?

That'd be great. We should be able to complain to the dev that they have not installed the listener, too.

@mister-ben Yes - this sounds good.

Is document.domain of the amp page in the search results carousel always cdn.ampproject.org? Is there a tool available to easily test pages in that context, i.e. the fancy proxy tool mentioned above?

You won't be able to get the iframing, but the proxy tool can be used to test local code on CDN pages. Just use gulp serve

Is there anything else needed to be done here? Thanks

Yes, still need changes from @mister-ben.

@mister-ben any updates here? thanks.

Was this page helpful?
0 / 5 - 0 ratings