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

Video - Bail out if viewer is not visible #4995

Merged
merged 3 commits into from Sep 14, 2016

Conversation

aghassemi
Copy link
Contributor

No description provided.

this.vsync_ = vsyncFor(win);

/** @private @const {!../service/viewer-impl.Viewer} */
this.viewer_ = viewerFor(win);
Copy link
Member

Choose a reason for hiding this comment

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

I'd consider not using an instance var for rarely used services.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

viewer.isVisible() can be called several times per video, might be worth caching a reference here.

@cramforce
Copy link
Member

The call is super fast. Not worth caching except for stuff like animations
where you call all the time.

On Wed, Sep 14, 2016 at 2:51 PM, Ali Ghassemi notifications@github.com
wrote:

@aghassemi commented on this pull request.

In src/service/video-manager-impl.js
#4995:

 this.vsync_ = vsyncFor(win);
  • /** @Private @const {!../service/viewer-impl.Viewer} */
  • this.viewer_ = viewerFor(win);

viewer.isVisible() can be called several times per video, might be worth
caching a reference here.


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#4995, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFeT9NGlz9Q_5KF5Vcb7ubxyj7NOXdoks5qqGxrgaJpZM4J9DLU
.

@aghassemi
Copy link
Contributor Author

Done

@aghassemi
Copy link
Contributor Author

ugh, still can't merge. Can you merge this @cramforce ?

@aghassemi aghassemi merged commit 74e898f into ampproject:master Sep 14, 2016
dreamofabear pushed a commit to dreamofabear/amphtml that referenced this pull request Sep 16, 2016
mityaha pushed a commit to ooyala/amphtml that referenced this pull request Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Video
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants