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
import React from 'react'
2
0
0
3
const Context = React.createContext<{
4
// native
5
muted: boolean
6
-
setMuted: React.Dispatch<React.SetStateAction<boolean>>
7
// web
8
volume: number
9
-
setVolume: React.Dispatch<React.SetStateAction<number>>
10
} | null>(null)
11
Context.displayName = 'VideoVolumeContext'
12
13
export function Provider({children}: {children: React.ReactNode}) {
14
const [muted, setMuted] = React.useState(true)
15
-
const [volume, setVolume] = React.useState(1)
16
17
const value = React.useMemo(
18
() => ({
···
1
import React from 'react'
2
3
+
import {device, useStorage} from '#/storage'
4
+
5
const Context = React.createContext<{
6
// native
7
muted: boolean
8
+
setMuted: (v: boolean) => void
9
// web
10
volume: number
11
+
setVolume: (v: number) => void
12
} | null>(null)
13
Context.displayName = 'VideoVolumeContext'
14
15
export function Provider({children}: {children: React.ReactNode}) {
16
const [muted, setMuted] = React.useState(true)
17
+
const [volume = 1, setVolume] = useStorage(device, ['videoVolume'])
18
19
const value = React.useMemo(
20
() => ({
+1
src/storage/schema.ts
···
69
*/
70
policyUpdateDebugOverride?: boolean
71
[PolicyUpdate202508]?: boolean
0
72
}
73
74
export type Account = {
···
69
*/
70
policyUpdateDebugOverride?: boolean
71
[PolicyUpdate202508]?: boolean
72
+
videoVolume: number
73
}
74
75
export type Account = {