tangled
alpha
login
or
join now
bas.sh
/
witchsky.app
forked from
jollywhoppers.com/witchsky.app
0
fork
atom
Bluesky app fork with some witchin' additions 💫
0
fork
atom
overview
issues
pulls
pipelines
add video volume to persisted state
bas.sh
1 week ago
dfe707f0
d264c697
verified
This commit was signed with the committer's
known signature
.
bas.sh
SSH Key Fingerprint:
SHA256:Wtf8XM3WWN/LYc74Pv3EPWVYCxXkAsC47BMtt0nWSZ0=
+6
-3
2 changed files
expand all
collapse all
unified
split
src
components
Post
Embed
VideoEmbed
VideoVolumeContext.tsx
storage
schema.ts
+5
-3
src/components/Post/Embed/VideoEmbed/VideoVolumeContext.tsx
···
1
1
import React from 'react'
2
2
3
3
+
import {device, useStorage} from '#/storage'
4
4
+
3
5
const Context = React.createContext<{
4
6
// native
5
7
muted: boolean
6
6
-
setMuted: React.Dispatch<React.SetStateAction<boolean>>
8
8
+
setMuted: (v: boolean) => void
7
9
// web
8
10
volume: number
9
9
-
setVolume: React.Dispatch<React.SetStateAction<number>>
11
11
+
setVolume: (v: number) => void
10
12
} | null>(null)
11
13
Context.displayName = 'VideoVolumeContext'
12
14
13
15
export function Provider({children}: {children: React.ReactNode}) {
14
16
const [muted, setMuted] = React.useState(true)
15
15
-
const [volume, setVolume] = React.useState(1)
17
17
+
const [volume = 1, setVolume] = useStorage(device, ['videoVolume'])
16
18
17
19
const value = React.useMemo(
18
20
() => ({
+1
src/storage/schema.ts
···
69
69
*/
70
70
policyUpdateDebugOverride?: boolean
71
71
[PolicyUpdate202508]?: boolean
72
72
+
videoVolume: number
72
73
}
73
74
74
75
export type Account = {