mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-11 05:35:08 +01:00
Merge branch 'dev' into time-format
This commit is contained in:
commit
01348f2f9a
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "movie-web",
|
"name": "movie-web",
|
||||||
"version": "3.0.12",
|
"version": "3.0.13",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://movie-web.app",
|
"homepage": "https://movie-web.app",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -7,12 +7,12 @@ export function useVolumeControl(descriptor: string) {
|
|||||||
const controls = useControls(descriptor);
|
const controls = useControls(descriptor);
|
||||||
const mediaPlaying = useMediaPlaying(descriptor);
|
const mediaPlaying = useMediaPlaying(descriptor);
|
||||||
|
|
||||||
const toggleVolume = () => {
|
const toggleVolume = (isKeyboardEvent = false) => {
|
||||||
if (mediaPlaying.volume > 0) {
|
if (mediaPlaying.volume > 0) {
|
||||||
setStoredVolume(mediaPlaying.volume);
|
setStoredVolume(mediaPlaying.volume);
|
||||||
controls.setVolume(0);
|
controls.setVolume(0, isKeyboardEvent);
|
||||||
} else {
|
} else {
|
||||||
controls.setVolume(storedVolume > 0 ? storedVolume : 1);
|
controls.setVolume(storedVolume > 0 ? storedVolume : 1, isKeyboardEvent);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ export function KeyboardShortcutsAction() {
|
|||||||
|
|
||||||
// Mute
|
// Mute
|
||||||
case "m":
|
case "m":
|
||||||
toggleVolume();
|
toggleVolume(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Decrease volume
|
// Decrease volume
|
||||||
|
Loading…
Reference in New Issue
Block a user