fix(mobile): preserve pitch for Android video playback (#4940)
This commit is contained in:
parent
20cc43cf16
commit
8d2a5a98ae
|
|
@ -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 })
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue