Process videos on web with WebCodecs (#10955)
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
@@ -1,7 +1,26 @@
|
||||
import {atoms as a, flatten} from '#/alf'
|
||||
|
||||
export function clearThumbnailCache() {
|
||||
// no-op
|
||||
// no-op on web
|
||||
}
|
||||
|
||||
export function VideoTranscodeBackdrop() {
|
||||
return null
|
||||
export function VideoTranscodeBackdrop({uri}: {uri: string}) {
|
||||
return (
|
||||
<video
|
||||
src={uri}
|
||||
style={flatten([
|
||||
a.absolute,
|
||||
a.inset_0,
|
||||
a.h_full,
|
||||
a.w_full,
|
||||
{
|
||||
objectFit: 'cover',
|
||||
filter: 'blur(15px)',
|
||||
transform: 'scale(1.1)', // hide blur edges
|
||||
},
|
||||
])}
|
||||
muted
|
||||
playsInline
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user