TheWidlarzGroup / react-native-video

A <Video /> component for react-native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: iPhone heating up when playing manifest video

ngima opened this issue · comments

Version

6.1.1

What platforms are you having the problem on?

iOS

Architecture

Old architecture

What happened?

When playing video manifest with react-native-video Video component. The iPhone is heating up over the time.

Reproduction

repository link

Reproduction

  • Navigate from Screen1 to Screen2
  • Play HLS video manifest in iPhone using react-native-video in Screen2
  • Go Back to Screen1
  • Repeat for several time
  • Device started to heat
graph TD;
    Screen1-->Screen2-->PlayVideo-->Screen1;
Loading
// Screen2
<Video
    style={{
        height: 200,
        width: 300,
        backgroundColor: 'red'
    }}
    controls
    ignoreSilentSwitch={'ignore'}
    source={{ uri: 'https://content.jwplatform.com/manifests/vM7nH0Kl.m3u8' }}
    onError={(e) => { alert(e) }}
/>

Are you sure you don't play multiple video with the screen stack ?
Is this something you can reproduce without navigation ?

@freeboub thanks for the response,

Yes, I am only playing one video at a time. But what I have noticed so far is the RAM uses increases constantly after playing second video even after exiting the Screen with Video Player.

I have not tried it without navigation but will try it and will let you know if I can reproduce that without navigation.

Seems like the problem was with the wrapper component.

@freeboub,

Seems like when leaving the screen with video player, if the video player is in paused state then it's seems to be the reference is not destroyed or garbage collected.


Let's assume, I have screen Home Screen and Video Player Screen.

  • Go to video player screen
  • Play Video
  • Pause Video
  • Go back

If you see the RAM uses then it just increases and never stops and device started to heating up.

@ngima I suspect this is the same issue than : #3567
Can you please double check on 6.2.0 if this is still reproduced?

@ngima I suspect this is the same issue than : #3567 Can you please double check on 6.2.0 if this is still reproduced?

Thanks for the quick response. Sure, I will check it.

Looks good in v6.2.0, now the seems like the garbage collection working properly.
Thanks @freeboub