This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: More advanced YouTube pre-load decisions based on device #309
feat: More advanced YouTube pre-load decisions based on device #309
Changes from 3 commits
22187c3
191a27b
5265b32
a1ccbd3
c0224a7
ac5d4d7
21e5122
d6925bd
bcda2aa
0b0137c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think this is more about testing touch v pointer than it is about mobile devices. Maybe the variable name should reflect that.
I know I was the one originally mentioning touch devices, but thinking about this again, I’m wondering if the best isn’t to just listen to a
touchstart
event that would act as ahover
state.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.
That's a really interesting, and probably very valid, point. I'm going to look into this some more (thanks for the links!) and chat it through with team 👍
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.
I discussed this with @OllysCoding and we both agreed your points are spot on @mxdvl and so I've refactored this PR to use
onTouchStart
in addition toonHover
. The result of this is a my previously rather large PR is now basically a one-liner.It's true that this means we sometimes delay the point at which a video is downloaded but as per your points and the linked articles I don't think we were accurately making the decisions about when to do this before and waiting until the user actually interacts is more accurate.