-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Improve flexibility of quality selector #1081
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
Open
gurupras
wants to merge
13
commits into
sampotts:develop
Choose a base branch
from
gurupras:better-quality-selector
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
14d0ce3
Tweaked quality selector to be more accomodating
gurupras 6bd9462
Added some minor changes to code relating to i18n
gurupras fda8424
Updated to use inbuilt type checkers
gurupras 6e41d5e
Incorported early-return feedback
gurupras faaeb5d
Linting fixes
gurupras 28add9b
Fix plyr.quality setter
gurupras c3103f4
Restored old ${value}p logic for displaying qualities
gurupras 99613ca
Removed index as a required property
gurupras 41fe611
Fix default quality
gurupras 2e20972
Updated plyr.quality setter to continue to be backwards compatible
gurupras 3643a03
Fixed dedupe
gurupras b081ca0
Quality attribute label is no longer mandatory
gurupras d50c65a
Fixed getBadge logic
gurupras File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
The old quality setter code was already too complex and hard to understand, so I think this is a step in the wrong direction. I think you should restore the old setter and the getter in the html5/youtube plugins and add a new getter/setter that sets only by index.
videoTrackorlevelperhaps?Uh oh!
There was an error while loading. Please reload this page.
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.
Part of your comment, I think, is referring to the fact that this setter is trying to account for number/string/object all-in-one.
The number version was added just now to be backwards compatible. At least with plyr.io. It wasn't meant to handle index.
The string version is to cater to users wanting to set it by label.
The object version is mainly to handle the internal implementation wherein:
user clicks quality option --> translate
event.target.valueinto quality somehow. This was where the object came into play.Now, with the suggestion to remove index attribute and use it as the value while creating radio button, we can update the quality setter to receive, for example, either
["0", 0, { index: 0 }]. I opted for the object implementation to allow sufficient differentiation.