-
Notifications
You must be signed in to change notification settings - Fork 845
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
Setting loudness to default volume in new videos #3203
Merged
FreeTubeBot
merged 7 commits into
FreeTubeApp:development
from
predystopic-dev:development
Mar 8, 2023
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d45a41a
Made changes as suggested.
predystopic-dev 3876b55
Made player set volume to user default if it was muted by dragging vo…
predystopic-dev 9c3ea46
added comments
predystopic-dev f4e684e
fixed
predystopic-dev b8d641b
fixed
predystopic-dev 917b5b9
Changed comments to be more accurate.
predystopic-dev b2d9b13
Merge branch 'FreeTubeApp:development' into development
predystopic-dev 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 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 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.
Why are you checking the session storage here, instead of the 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.
sessionStorage is not set to true when we drag the slider to 0 (it does get set to true if we press 'm' or click on mute though) so in those cases I am setting volume to defaultVolume set by user in settings. This should happen when updateVolume function is called by volumechange event I reckon? Because if these conditions are checked in player, then the feature doesn't work as intended
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.
Video.js doesn't change anything in session storage. the values in session storage are set once at startup by the code in the settings file and then updated by the code in this function every time the player is muted/unmuted or the volume of the player changes. Without this updateVolume function nothing would be changed in session storage after setting the initial values at startup in the settings file.
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.
Are there any changes that I should do here? I tried checking sessionStorage in player and update player volume accordingly but it doesn't work as intended.