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-nexxtv-player updates #32617

Merged
merged 14 commits into from
Apr 21, 2021
Merged

amp-nexxtv-player updates #32617

merged 14 commits into from
Apr 21, 2021

Conversation

neko-fire
Copy link
Contributor

amp-nexxtv-player updates & maintenance

♻️

  • optimized iframe creation
  • added paramter data-exit-mode
  • renamed album -> audioalbum
  • data-domain can be used now as data-client
  • added consent parameter from amp-consent
  • added load event

🚮 removed optional parameters: data-origin, data-seek-to, playlist-mask, delay
📖 updated readme and code sample

- added consent data for plugin
- added playerReady State
- reworked func layoutCallback
- optimized iframe creation function
- reworked param origin
- removed delay
- reworked client
- edit docs
- updated protoascii
@amp-owners-bot
Copy link

amp-owners-bot bot commented Feb 11, 2021

Hey @alanorozco! These files were changed:

extensions/amp-nexxtv-player/0.1/amp-nexxtv-player.js
extensions/amp-nexxtv-player/0.1/test/test-amp-nexxtv-player.js
extensions/amp-nexxtv-player/amp-nexxtv-player.md

Hey @ampproject/wg-caching! These files were changed:

extensions/amp-nexxtv-player/0.1/test/validator-amp-nexxtv-player.html
extensions/amp-nexxtv-player/0.1/test/validator-amp-nexxtv-player.out
extensions/amp-nexxtv-player/validator-amp-nexxtv-player.protoascii

@CLAassistant
Copy link

CLAassistant commented Feb 11, 2021

CLA assistant check
All committers have signed the CLA.

@honeybadgerdontcare
Copy link
Contributor

@twifkak for validator review

Copy link
Member

@alanorozco alanorozco left a comment

Choose a reason for hiding this comment

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

Thanks @neko-fire

@honeybadgerdontcare honeybadgerdontcare requested review from banaag and removed request for twifkak February 18, 2021 20:33
Copy link
Member

@twifkak twifkak left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good for validator changes; left a couple of small requests.

@neko-fire
Copy link
Contributor Author

neko-fire commented Mar 1, 2021

Anything else that needs to be changed? @alanorozco

Copy link
Member

@alanorozco alanorozco left a comment

Choose a reason for hiding this comment

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

Sorry @neko-fire, I failed to clicked submit on this review previously 😳

extensions/amp-nexxtv-player/0.1/amp-nexxtv-player.js Outdated Show resolved Hide resolved
extensions/amp-nexxtv-player/0.1/amp-nexxtv-player.js Outdated Show resolved Hide resolved
'disableAds': disableAds,
'streamingFilter': streamingFilter,
'exitMode': exitMode,
'consentString': this.consentString_,
Copy link
Member

Choose a reason for hiding this comment

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

Take consentString as parameter.

Suggested change
'consentString': this.consentString_,
'consentString': consentString,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alanorozco I've changed all your requests regarding consentString. But unit test keeps now failing due to timeout, I don't know how to fix this.

@neko-fire
Copy link
Contributor Author

Any news on this topic @alanorozco

Copy link
Member

@alanorozco alanorozco left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you.

@alanorozco
Copy link
Member

@neko-fire Please ensure that the previous tests pass. I can't merge this otherwise.

These are probably timing out since we're now waiting for a consent response before resolving layoutCallback. You should probably mock/stub the consent responses.

amp-nexxtv-player
  
  ✗ renders nexxtv video player
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  ✗ removes iframe after unlayoutCallback
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  ✗ should forward events from nexxtv-player to the amp element
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  ✗ should pass consent value to iframe
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

https://app.circleci.com/pipelines/github/ampproject/amphtml/4686/workflows/10beb7b2-696f-426d-9ddc-14f4c6ea852c/jobs/61269

@antiphoton antiphoton added the WG: Caching: Triaged Initial triage from wg-caching complete. Remove label if new input required. label Apr 12, 2021
@neko-fire
Copy link
Contributor Author

@neko-fire Please ensure that the previous tests pass. I can't merge this otherwise.

These are probably timing out since we're now waiting for a consent response before resolving layoutCallback. You should probably mock/stub the consent responses.

amp-nexxtv-player
  
  ✗ renders nexxtv video player
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  ✗ removes iframe after unlayoutCallback
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  ✗ should forward events from nexxtv-player to the amp element
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  ✗ should pass consent value to iframe
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

https://app.circleci.com/pipelines/github/ampproject/amphtml/4686/workflows/10beb7b2-696f-426d-9ddc-14f4c6ea852c/jobs/61269

Hi @alanorozco , I've fixed the issue with the test.

@alanorozco
Copy link
Member

@neko-fire: Since we removed playerReadyPromise to fix the test, your player might miss calls to autoplay etc. Did you manualy test with a throttled network?

@neko-fire
Copy link
Contributor Author

neko-fire commented Apr 16, 2021

@neko-fire: Since we removed playerReadyPromise to fix the test, your player might miss calls to autoplay etc. Did you manualy test with a throttled network?

Yes I do during my frontend test, since the player also checks the connection to play out the right quality. Also our player does not support autoplay in iframe context. I did not run into any issues here.

@neko-fire
Copy link
Contributor Author

Hi @alanorozco , do you want me to change something before merge?

@alanorozco
Copy link
Member

Ok, if it doesn't do autoplay then we're probably fine. Thanks for the update.

@alanorozco alanorozco merged commit 08dc823 into ampproject:main Apr 21, 2021
MichaelRybak added a commit to MichaelRybak/amphtml that referenced this pull request Apr 26, 2021
MichaelRybak added a commit that referenced this pull request Apr 26, 2021
* cl/369469304 Revision bump for #33848

* cl/369546330 Revision bump for #33926

* cl/369928825 Revision bump for #32617

* cl/369967220 Require amp-video extension if amp-video is used on the page. Change from a warning.

Co-authored-by: Greg Grothaus <greggrothaus@google.com>
rochapablo pushed a commit to rochapablo/amphtml that referenced this pull request Aug 30, 2021
♻️ 
- optimized iframe creation
- added paramter data-exit-mode
- renamed album -> audioalbum
- data-domain can be used now as data-client
- added consent parameter from amp-consent
- added load event

🚮 removed optional parameters: data-origin, data-seek-to, playlist-mask, delay
📖 updated readme and code sample
rochapablo pushed a commit to rochapablo/amphtml that referenced this pull request Aug 30, 2021
* cl/369469304 Revision bump for ampproject#33848

* cl/369546330 Revision bump for ampproject#33926

* cl/369928825 Revision bump for ampproject#32617

* cl/369967220 Require amp-video extension if amp-video is used on the page. Change from a warning.

Co-authored-by: Greg Grothaus <greggrothaus@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR use: In Beta / Experimental PR use: In Stable WG: Caching: Triaged Initial triage from wg-caching complete. Remove label if new input required. WG: caching
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants