Skip to content

Build your personal knowledge base with Trilium Notes

client/media player: hide the volume slider on the mobile version

Adorian Doranbe7afa980023
diff --git a/apps/client/src/widgets/type_widgets/file/MediaPlayer.tsx b/apps/client/src/widgets/type_widgets/file/MediaPlayer.tsx
index 02d3c31959..88b0edee34 100644
--- a/apps/client/src/widgets/type_widgets/file/MediaPlayer.tsx
+++ b/apps/client/src/widgets/type_widgets/file/MediaPlayer.tsx
@@ -8,6 +8,7 @@ import type FNote from "../../../entities/fnote";
import attributes from "../../../services/attributes";
import froca from "../../../services/froca";
import { t } from "../../../services/i18n";
+import { isMobile } from "../../../services/utils";
import { logError } from "../../../services/ws";
import ActionButton from "../../react/ActionButton";
import Dropdown from "../../react/Dropdown";
@@ -127,6 +128,10 @@ export function VolumeControl({ mediaRef }: { mediaRef: RefObject<HTMLVideoEleme
setMuted(media.muted);
};
+ // Mobile defers volume to the OS/hardware volume buttons, matching native mobile media players (and the
+ // fixed-width slider doesn't fit the narrow controls row anyway).
+ if (isMobile()) return null;
+
return (
<div class="media-volume-row">
<ActionButton