fix(mobile): preserve pitch for Android video playback (#4940)

This commit is contained in:
Luke D Williams 2026-04-02 08:00:25 -05:00 committed by GitHub
parent bd879d5f9e
commit 01dcb2985e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,7 @@ export function VideoPlayer({
const player = useVideoPlayer(source, (player) => {
player.loop = true
player.muted = true
player.preservesPitch = true
// player.play()
})
const { status } = useEvent(player, "statusChange", { status: player.status })

View File

@ -187,7 +187,9 @@ const ThumbnailImage = ({ entryId }: { entryId: string }) => {
const audioState = useAudioPlayState(audio?.url)
const video = mediaModel?.type === "video" ? mediaModel : null
const videoViewRef = useRef<null | VideoView>(null)
const videoPlayer = useVideoPlayer(video?.url ?? "")
const videoPlayer = useVideoPlayer(video?.url ?? "", (player) => {
player.preservesPitch = true
})
const [showVideoNativeControlsForAndroid, setShowVideoNativeControlsForAndroid] = useState(false)
const handlePressPlay = useCallback(() => {
if (video) {