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
Extension amp-3q-player added #7999
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
Is there someone who can help with the validator? It's not passing the validation at the end. |
@JuliusThms Thanks for contributing! It looks like there may be some filenaming changes that need to be made and I'll point out some things for validation. The filenames should reflect the name of your component which is The validator issue can be found at the bottom of the travis build: The issue is that the
|
examples/3q.amp.html
Outdated
@@ -0,0 +1,23 @@ | |||
<!doctype html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename to 3q-player.amp.html
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -0,0 +1,54 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename to test-amp-3q-player.js
.
@@ -0,0 +1,54 @@ | |||
/** | |||
* Copyright 2016 The AMP HTML Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/2016/2017
@@ -0,0 +1,190 @@ | |||
/** | |||
* Copyright 2016 The AMP HTML Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/2016/2017
@@ -0,0 +1,47 @@ | |||
<!-- | |||
Copyright 2016 The AMP HTML Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/2016/2017
@@ -0,0 +1,71 @@ | |||
# | |||
# Copyright 2016 The AMP HTML Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/2016/2017
@@ -0,0 +1,54 @@ | |||
<!--- | |||
Copyright 2016 The AMP HTML Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/2016/2017
@@ -0,0 +1,47 @@ | |||
<!-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename to validator-amp-3q-player.html
.
error_message: "contents" | ||
} | ||
} | ||
spec_url: "https://www.ampproject.org/docs/reference/extended/amp-3q-player.html" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ampproject recently changed the urls, while this will redirect to the new one, lets just point to the new location instead, https://www.ampproject.org/docs/reference/components/media/amp-3q-player
.
mandatory: true | ||
} | ||
attr_lists: "extended-amp-global" | ||
spec_url: "https://www.ampproject.org/docs/reference/extended/amp-3q-player.html" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ampproject recently changed the urls, while this will redirect to the new one, lets just point to the new location instead, https://www.ampproject.org/docs/reference/components/media/amp-3q-player
.
satisfies: "amp-3q-player" | ||
requires: "amp-3q-player extension .js script" | ||
attrs: { | ||
name: "data-id" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an FYI: It is possible to enforce certain values for this in addition to making it mandatory. This can be done with value_regex
or value_regex_casei
. Up to you if you want to try and implement that type of regex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ill do the next days.
layout="responsive"> | ||
</amp-3q-player> | ||
|
||
<!-- invalid, needs data-id --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the .out
file being empty, this is also a reason the travis build is failing. This test file will fail. So the .out
file should start with FAIL
followed by the errors in the file. According to the travis output we saw earlier it was expecting to see:
FAIL
amp-3q-player/0.1/test/validator-amp-3q.html:41:4 The mandatory attribute 'data-id' is missing in tag 'amp-3q-player'. (see https://www.ampproject.org/docs/reference/extended/amp-3q-player.html) [AMP_TAG_PROBLEM]
This would go into the .out
file. Note that after you update the spec_url, that the above would reflect the spec_url. So if you copy/paste this, please also update the spec_url here.
Note I made some comments on files that were renamed, so you may want to look at outdated changes to see those comments. Let me know if you have other questions. |
@honeybadgerdontcare Many Thanks for your review. I commited the changes. |
spec_name: "amp-3q-player extension .js script" | ||
satisfies: "amp-3q-player extension .js script" | ||
mandatory_parent: "HEAD" | ||
requires: "amp-3q-player" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of requires
here lets use this instead: extension_unused_unless_tag_present: "amp-3q-player"
. This also means we get to remove the satisfies: "amp-3d-player"
below.
Yes. But is this a message that is sent by the player and received by AMP (if so, it's our code's problem), or is this one sent by AMP to the player (if so, it's 3q's). From reading your comment, I was under the impression is was this |
@jridgewell Yes, you we're right. We changed the player so it's getting not fired too early. We have to wait some hours until the change is deployed. |
@JuliusThms In the ideal situation, player sends the |
@JuliusThms Current tests failures are the unit tests and not related to video-interface integration tests. They should be simple to fix and are probably due to the all the new code changes. |
@aghassemi Ok, i'll take a look |
@aghassemi Changed the unit tests, should be running fine now. |
@aghassemi The tests are passing, are we ready to go? |
html_format: AMP | ||
tag_name: "AMP-3Q-PLAYER" | ||
requires: "amp-3q-player extension .js script" | ||
attrs: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add autoplay
attrs: {
name: "autoplay"
value: ""
}
if (this.unlistenMessage_) { | ||
this.unlistenMessage_(); | ||
} | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also add:
this.playerReadyPromise_ = new Promise(resolve => {
this.playerReadyResolver_ = resolve;
});
before returning.
@JuliusThms This is looking amazing! Thanks for taking the time to fully implement the video-interface. Two more small requests and then we can finally merge. Sorry for long review process, but this is turning out to be one of the best video players in AMP. |
@aghassemi I made the changes. Many thanks for the time you invest. It's a pleasure to contribute to this great project, and thanks for the good feedback! |
Merged! |
will take about three weeks until code is fully in production (including validator changes) |
@aghassemi Great! Let me know if i can do something! |
Extension amp-3q-player added for embedding Video from 3qsdn