Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video crashes on Android due to some wrong exoplayer2 dependency #1004

Open
Buthrakaur opened this issue Jan 9, 2024 · 0 comments
Open

Video crashes on Android due to some wrong exoplayer2 dependency #1004

Buthrakaur opened this issue Jan 9, 2024 · 0 comments

Comments

@Buthrakaur
Copy link

Environment

  1. Development OS: Mac, Windows
  2. Device OS & Version: Android 14
  3. Version: ViroReact version 2.23.1 and React Native version 0.71.3
  4. Device(s): Google Pixel 7A (Android 14)

Description

The app crashes when using a simple ViroVideo component with any video and no specific settings:

java.lang.NoSuchMethodError: No direct method <init>(Lcom/google/android/exoplayer2/upstream/BandwidthMeter;)V 
  in class Lcom/google/android/exoplayer2/trackselection/AdaptiveTrackSelection$Factory; or its super classes (declaration of 'com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection$Factory' appears in /data/app/~~w_ah16GTD9rXZlbGVbjXvw==/org.smart_guide.smartguide.T_00007-JIfgNEWRCUEvF3YUu5IqKw==/base.apk!classes2.dex)
  at void com.viro.core.internal.AVPlayer.<init>(long, android.content.Context) (AVPlayer.java:98)
  at void com.viro.core.internal.PlatformUtil.runTask(int) (PlatformUtil.java:-2)
  at void com.viro.core.internal.PlatformUtil.access$000(int) (PlatformUtil.java:77)
  at void com.viro.core.internal.PlatformUtil$TaskRunnable.run() (PlatformUtil.java:97)
  at void android.opengl.GLSurfaceView$GLThread.guardedRun() (GLSurfaceView.java:1502)
  at void android.opengl.GLSurfaceView$GLThread.run() (GLSurfaceView.java:1272)

related code change when trying to understand the root cause of the crash

virocore changed AVPlayer code from new AdaptiveTrackSelection.Factory(new DefaultBandwidthMeter()); to new AdaptiveTrackSelection.Factory() in this commit: ReactVision/virocore@6bad81c (Sep 4, 2021) migrating from exoplayer 2.7.1 to 2.13.3, but it probably somehow didn't make it into current master and 2.23.1

Reproducible Demo

Nothing special needed - just use ViroVideo on Android in the AR scene and run the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant