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 #2709

Merged
merged 1 commit into from
Mar 28, 2016
Merged

AMP jwplayer #2709

merged 1 commit into from
Mar 28, 2016

Conversation

pablos1
Copy link
Contributor

@pablos1 pablos1 commented Mar 25, 2016

Implements #2125 (continues #2660)

@pablos1
Copy link
Contributor Author

pablos1 commented Mar 28, 2016

@rudygalfi @dvoytenko Can we add the "needs review" tag to this PR?

@dvoytenko dvoytenko self-assigned this Mar 28, 2016

/** @override */
layoutCallback() {
/** @private @const {string} */
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you actually move this.contentid_ and this.playerid_ declarations into the buildCallback - it's much better to report these errors as soon as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dvoytenko I had done that, but when the assertions are in buildCallback, I get validator errors for the tests:

AssertionError: expected promise to be rejected with an error matching /Either the data-media-id
or the data-playlist-id attributes must be/ but it was fulfilled with <amp-jwplayer class="-amp-
element -amp-notbuilt amp-notbuilt -amp-layout-responsive -amp-layout-size-defined -amp-
error" data-player-id="sDZEo0ea" width="320" height="180" layout="responsive" id="AMP_1">
<i-amp-sizer style="display: block; padding-top: 56.25%;"></i-amp-sizer><iframe 
frameborder="0" allowfullscreen="true" src="https://content.jwplatform.com/players/undefined-
undefined.html" class="-amp-fill-content" width="320" height="180"></iframe></amp-jwplayer>

Should I add an additional assertion in layoutCallback? Or is there an issue in the tests?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. I'd rather move them to buildCallback and lose that test, than delay errors. So, let's move the asserts and remove affected test (it looks like it's just the one).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dvoytenko OK, I removed the tests. There were two of them, both related to the same thing. Squashing the commits now.

@dvoytenko
Copy link
Contributor

@pablos1 All looks good. Just two small requests to improve the error messaging and timing. Once done, could you please also squash the commits?

@pablos1
Copy link
Contributor Author

pablos1 commented Mar 28, 2016

@dvoytenko One quick question on the error timing. Once that looks good, I'll squash the commits.

@dvoytenko
Copy link
Contributor

LGTM. Merging. Thanks a lot!

@dvoytenko dvoytenko merged commit 68c5c0a into ampproject:master Mar 28, 2016
@pablos1 pablos1 deleted the amp-jwplayer branch March 28, 2016 19:59
@pablos1
Copy link
Contributor Author

pablos1 commented Mar 28, 2016

Thanks!

@johnluther
Copy link

Thanks, everyone! @dvoytenko , will this component be rolled into the next release?

JL

@erwinmombay
Copy link
Member

@johnluther this will get released to canary this thursday, full production next week thursday

@johnluther
Copy link

Awesome, thanks @erwinmombay !

JL

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.

4 participants