TheWidlarzGroup / react-native-video

A <Video /> component for react-native
MIT License
7.09k stars 2.86k forks source link

[BUG]: ResizeMode does not apply after the second play onwards when props repeat true #3929

Closed krisnapy closed 2 days ago

krisnapy commented 3 weeks ago

Version

6.1.2

What platforms are you having the problem on?

Android

System Version

Android 13

On what device are you experiencing the issue?

Real device

Architecture

Old architecture

What happened?

ResizeMode does not apply after the second play onwards when props repeat true.

https://github.com/TheWidlarzGroup/react-native-video/assets/96037957/d4c4204d-14fc-47a3-ab58-8719f0aaf78d

import React from 'react'
import Video, { ResizeMode } from 'react-native-video'

import { LandingScreenProps } from './types'

export const LandingScreen: LandingScreenProps = () => {
  return (
    <Video
      source={{ uri: "https://d1c40hpuz0tre6.cloudfront.net/stories/01HZRFTRYCM19PZ49BE54Z4FSY.mp4" }}
      style={{ flex: 1 }}
      resizeMode={ResizeMode.COVER}
      controls
      repeat
    />
  )
}

Reproduction

No response

Reproduction

Step to reproduce this bug are:

  1. Play video with props repeat true.
freeboub commented 3 weeks ago

I don't reproduce the issue with the sample included in the repo. Can it be caused by the {flex: 1} usage ? BTW, I found an ugly resize blink when repeating the playback

krisnapy commented 3 weeks ago

Have you tried with my code or video source? Because I tried with other video sources, it did not happen with some of the videos.

freeboub commented 3 weeks ago

Your video have problems, I cannot read it correctly on VLC ... But you try to remove the flex: 1 ?

gabrielsalvi commented 3 weeks ago

The same is happening with me too.

Version 6.2.0 Android 13

moskalakamil commented 4 days ago

Hi @krisnapy @gabrielsalvi, I've implemented a fix for this issue. You can see the changes in the latest pull request #4000