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

Feat: player playback speed #306

Merged
merged 12 commits into from
Nov 27, 2022
Merged

Feat: player playback speed #306

merged 12 commits into from
Nov 27, 2022

Conversation

tymmesyde
Copy link
Member

@tymmesyde tymmesyde commented Oct 25, 2022

Closes #237
image

@nklhtv nklhtv self-requested a review October 27, 2022 08:02
Copy link
Collaborator

@nklhtv nklhtv left a comment

Choose a reason for hiding this comment

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

package-lock.json is missing

Copy link
Collaborator

@nklhtv nklhtv left a comment

Choose a reason for hiding this comment

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

use this effect to close the menu:

    React.useEffect(() => {
        if (videoState.playbackSpeed === null) {
            closeSpeedMenu();
        }
    }, [videoState.playbackSpeed]);

src/routes/Player/SpeedMenu/SpeedMenu.js Outdated Show resolved Hide resolved
src/routes/Player/Player.js Outdated Show resolved Hide resolved
src/routes/Player/ControlBar/ControlBar.js Outdated Show resolved Hide resolved
src/routes/Player/Player.js Show resolved Hide resolved
nklhtv
nklhtv previously approved these changes Nov 2, 2022
closeVideosMenu();
if (player.metaItem !== null && player.metaItem.type === 'Ready') {
toggleInfoMenu();
}

break;
}
case 'KeyR': {
closeInfoMenu();
closeSubtitlesMenu();
Copy link
Collaborator

Choose a reason for hiding this comment

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

call closeVideosMenu() here

}

break;
}
case 'KeyV': {
closeInfoMenu();
closeSubtitlesMenu();
Copy link
Collaborator

Choose a reason for hiding this comment

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

call closeSpeedMenu() here

case 'KeyR': {
closeInfoMenu();
closeSubtitlesMenu();
if (player.playbackSpeed !== null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be videoState
also it should be added to the effect deps

@nklhtv nklhtv merged commit 32af326 into development Nov 27, 2022
@nklhtv nklhtv deleted the feat/player-playback-speed branch May 25, 2023 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Playback Speed Control Option
2 participants