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

AMP jwplayer #2660

Closed
wants to merge 23 commits into from
Closed

AMP jwplayer #2660

wants to merge 23 commits into from

Conversation

pablos1
Copy link
Contributor

@pablos1 pablos1 commented Mar 21, 2016

Implements #2125

@rudygalfi
Copy link
Contributor

👍 @pablos1 Ready for review?

@pablos1
Copy link
Contributor Author

pablos1 commented Mar 21, 2016

@rudygalfi Yep, review away


/** @override */
layoutCallback() {
const width = this.element.getAttribute('width');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does jwplayer support poster images that can be shown without loading the player?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cramforce We do support poster images in the platform, but not all media assets have them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out how we do this for youtube. It has handling for the case where the poster image is missing.

@@ -0,0 +1,115 @@
<!---
Copyright 2015 Longtail Ad Solutions Inc.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you guys ok to contributing the code to the AMP Project and switching the copyright to " 2016 The AMP HTML Authors. All Rights Reserved." ? The one currently in place won't pass the projects presubmit checks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, @erwinmombay , fine with us to change the copyright to AMP.

}

/** @override */
documentInactiveCallback() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been renamed #pauseCallback. It's the same, but you don't have to return any value.

@pablos1
Copy link
Contributor Author

pablos1 commented Mar 25, 2016

@dvoytenko @rudygalfi All good? Anything else I can do here?

@rudygalfi
Copy link
Contributor

I'll defer to @dvoytenko on if more changes are needed, but before final submission you'll need to squash commits.

}).catch(() => {
// Thumbnails aren't available for all media content.
// On a 404, remove the placeholder image.
this.element.removeChild(imgPlaceholder);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do this part as:

}).catch(() => {
  this.deferMutate(() => {
    this.element.removeChild(imgPlaceholder);
  });
});

Or alternatively, you can wait for image to load before adding it to DOM. That way you can avoid playing with visibility as well.

@dvoytenko
Copy link
Contributor

@pablos1 Looks great. Just a couple of comments. Could you please also squash commits?

@pablos1 pablos1 closed this Mar 25, 2016
@pablos1 pablos1 deleted the amp-jwplayer branch March 25, 2016 22:39
@pablos1
Copy link
Contributor Author

pablos1 commented Mar 25, 2016

@dvoytenko Accidentally deleted the forked branch during the squash. It's back with the suggested changes. Could you re-open the PR?

@rudygalfi
Copy link
Contributor

I'm unable to re-open. You might need to start a new one.

@pablos1 pablos1 mentioned this pull request Mar 25, 2016
@pablos1
Copy link
Contributor Author

pablos1 commented Mar 25, 2016

I was afraid of that. #2709.

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.

7 participants