[Video] set audio category to ambient every time a new player is made (#4934)

* set auto category to ambient every time a new player is made

* mute on foregrounding

* remember previous state

---------

Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
Co-authored-by: Hailey <me@haileyok.com>
This commit is contained in:
Samuel Newman 2024-08-14 20:21:14 +01:00 committed by GitHub
parent 26d3777ecc
commit 21e214c235
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 2 deletions

View file

@ -16,8 +16,8 @@ export function VideoPreview({
}) {
const player = useVideoPlayer(video.uri, player => {
player.loop = true
player.muted = true
player.play()
player.volume = 0
})
return (