tangled
alpha
login
or
join now
stream.place
/
streamplace
Live video on the AT Protocol
74
fork
atom
overview
issues
1
pulls
pipelines
make the mute param kinda work sorta
Natalie B.
1 week ago
ea7b129f
97a8935c
+19
-1
1 changed file
expand all
collapse all
unified
split
js
components
src
components
mobile-player
player.tsx
+19
-1
js/components/src/components/mobile-player/player.tsx
···
5
5
PlayerStatusTracker,
6
6
usePlayerStore,
7
7
} from "../../player-store";
8
8
-
import { useStreamplaceStore } from "../../streamplace-store";
8
8
+
import {
9
9
+
useMuted,
10
10
+
useSetMuted,
11
11
+
useStreamplaceStore,
12
12
+
} from "../../streamplace-store";
9
13
import { Text, View } from "../ui";
10
14
import { Fullscreen } from "./fullscreen";
11
15
import { PlayerProps } from "./props";
···
28
32
const reportModalOpen = usePlayerStore((x) => x.reportModalOpen);
29
33
const setReportModalOpen = usePlayerStore((x) => x.setReportModalOpen);
30
34
const reportSubject = usePlayerStore((x) => x.reportSubject);
35
35
+
36
36
+
const setMuted = useSetMuted();
37
37
+
const muted = useMuted();
38
38
+
39
39
+
// if we set muted, set it and restore after
40
40
+
useEffect(() => {
41
41
+
let wasMuted = muted;
42
42
+
if (props.muted) {
43
43
+
setMuted(props.muted);
44
44
+
}
45
45
+
return () => {
46
46
+
setMuted(wasMuted);
47
47
+
};
48
48
+
});
31
49
32
50
useEffect(() => {
33
51
setReportingURL(props.reportingURL ?? null);