mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
feat: finish playback speed stuff
This commit is contained in:
@@ -55,7 +55,7 @@ export const PlaybackSpeedSelector = () => {
|
||||
}}
|
||||
>
|
||||
<Text>{speed}</Text>
|
||||
{speed === currentSpeed.value && (
|
||||
{speed === currentSpeed && (
|
||||
<MaterialCommunityIcons
|
||||
name="check-circle"
|
||||
size={24}
|
||||
|
@@ -228,13 +228,10 @@ export const VideoPlayer = () => {
|
||||
const onReadyForDisplay = () => {
|
||||
setIsLoading(false);
|
||||
setHasStartedPlaying(true);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (videoRef) {
|
||||
void videoRef.setRateAsync(currentSpeed.value, true);
|
||||
void videoRef.setRateAsync(currentSpeed, true);
|
||||
}
|
||||
}, [currentSpeed.value, videoRef]);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const synchronizePlayback = async () => {
|
||||
@@ -265,7 +262,7 @@ export const VideoPlayer = () => {
|
||||
shouldPlay={shouldPlay}
|
||||
resizeMode={resizeMode}
|
||||
volume={currentVolume.value}
|
||||
rate={currentSpeed.value}
|
||||
rate={currentSpeed}
|
||||
onLoadStart={onVideoLoadStart}
|
||||
onReadyForDisplay={onReadyForDisplay}
|
||||
onPlaybackStatusUpdate={setStatus}
|
||||
|
Reference in New Issue
Block a user