fix: play flickering bug

This commit is contained in:
Fredrik Burmester
2024-08-25 22:21:42 +02:00
parent c0f4587501
commit 969e68901a
2 changed files with 11 additions and 8 deletions

View File

@@ -17,6 +17,7 @@ import Animated, {
import Video from "react-native-video";
import { Text } from "./common/Text";
import { Loader } from "./Loader";
import { debounce } from "lodash";
export const CurrentlyPlayingBar: React.FC = () => {
const segments = useSegments();
@@ -195,13 +196,7 @@ export const CurrentlyPlayingBar: React.FC = () => {
onFullscreenPlayerDidDismiss={() => {}}
onFullscreenPlayerDidPresent={() => {}}
onPlaybackStateChanged={(e) => {
if (e.isPlaying) {
setIsPlaying(true);
} else if (e.isSeeking) {
return;
} else {
setIsPlaying(false);
}
setIsPlaying(e.isPlaying);
}}
onVolumeChange={(e) => {
setVolume(e.volume);