expo / videoplayer

Customizable controls for Expo video
83 stars 83 forks source link

Slow video looping on android devices #25

Closed gregtap closed 6 years ago

gregtap commented 6 years ago

It looks like the isLooping performs a full reload of the video (seek 0?) and freezes for a couple of seconds. Tested on two different androids. Ok on IOS.

expo: 2.23.1 expo-video: 0.40

 <Video
          source={require('../../../assets/carotte4.mp4')} // eslint-disable-line
          rate={1.0}
          volume={0}
          isMuted
          isLooping
          resizeMode="cover"
          shouldPlay
          style={styles.video}
/>

device video : https://storage.googleapis.com/greg_stuff/android_slug.mp4 video source : https://storage.googleapis.com/greg_stuff/carotte4.mp4 Test app: https://storage.googleapis.com/greg_stuff/android%252F%40gregt%252Fchefclub-d55d2e1e-3295-11e8-9770-0a580a782004-signed.apk

Other thing: is the vertical video has a resolution of 960x1440, it just does not load.

https://storage.googleapis.com/greg_stuff/carotte_960x1440.mp4

Did I miss anything? Is there a way to force caching a video in ram, or how can I pinpoint the origin of the freeze? IO activity monitoring on Android?

joelpallagud commented 6 years ago

Im having the same problem with my setup. Were you able to fix it?

joelpallagud commented 6 years ago

@sjchmiela @jesseruder Im sorry for tagging you here but i saw in issue #958 you have good knowledge on Expo.Video

sjchmiela commented 6 years ago

Sorry for the late response β€” indeed, at the moment Expo video player performs a full reload of the video (seek 0). It will be fixed once we update the underlying Exoplayer dependency. 😞

joelpallagud commented 6 years ago

Is it the same dependency as react-native-video? Cause I remember using that in my previous project and looping works perfectly

sjchmiela commented 6 years ago

At the moment Expo uses a rather old version (Updated Oct 17, 2016) of ExoPlayer β€” 2.0.3, which does not implement setRepeatMode yet. It has been introduced in https://github.com/google/ExoPlayer/commit/4d1826dd3d079338495a2e5d178c244580c7ad42, ExoPlayer 2.5.0.

I'll create an upstream issue about upgrading the ExoPlayer dependency. πŸ™‚

joelpallagud commented 6 years ago

So that's why. Thank you very much for your good work! :)

sjchmiela commented 6 years ago

Ok, instead of creating an issue I've created a PR updating the dependency and its usage in the SDK. I think we can even make it to SDK 28. πŸ™‚

uholland commented 5 years ago

It seems to be the same issue with expo 2.6.14 and expo client 32 on android. Is there any progress on this issue?