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

⚠️ [Dependency Updates] Update googleExoPlayerVersion to 2.18.1 #17936

Closed
wants to merge 18 commits into from

Conversation

ParaskP7
Copy link
Contributor

@ParaskP7 ParaskP7 commented Feb 9, 2023

Parent #17566

This PR updates googleExoPlayerVersion to 2.18.1. FYI: This is NOT the latest version of google.exoplayer.

Also, as part of this update the below transitive dependencies were added:

  • On the WordPress module (359b690):
    • com.google.android.exoplayer:exoplayer-common
    • com.google.android.exoplayer:exoplayer-core
    • com.google.android.exoplayer:exoplayer-dash
    • com.google.android.exoplayer:exoplayer-hls
    • com.google.android.exoplayer:exoplayer-smoothstreaming
    • com.google.android.exoplayer:exoplayer-ui

Note that the latest 2.18.2 update requires libraries and applications that depend on it to compile against version 33 (Android 13) or later of the Android APIs. However, this project is currently compiled against android-31 (Android 12).

Thus, until the compileSdkVersion of this project gets updated to 33, updating to 2.18.2 isn't possible.

More details
* What went wrong:
Execution failed for task ':WordPress:checkJetpackWasabiDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
 > 12 issues were found when checking AAR metadata:
   
     1.  Dependency 'com.google.android.exoplayer:exoplayer:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
     2.  Dependency 'com.google.android.exoplayer:exoplayer-dash:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
     3.  Dependency 'com.google.android.exoplayer:exoplayer-hls:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
     4.  Dependency 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
     5.  Dependency 'com.google.android.exoplayer:exoplayer-rtsp:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
     6.  Dependency 'com.google.android.exoplayer:exoplayer-core:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
     7.  Dependency 'com.google.android.exoplayer:exoplayer-ui:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
     8.  Dependency 'com.google.android.exoplayer:exoplayer-datasource:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
     9.  Dependency 'com.google.android.exoplayer:exoplayer-extractor:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
    10.  Dependency 'com.google.android.exoplayer:exoplayer-decoder:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
    11.  Dependency 'com.google.android.exoplayer:exoplayer-database:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).
   
    12.  Dependency 'com.google.android.exoplayer:exoplayer-common:2.18.2' requires libraries and applications that
         depend on it to compile against version 33 or later of the
         Android APIs.
   
         :WordPress is currently compiled against android-31.
   
         Also, the maximum recommended compile SDK version for Android Gradle
         plugin 7.2.1 is 32.
   
         Recommended action: Update this project's version of the Android Gradle
         plugin to one that supports 33, then update this project to use
         compileSdkVerion of at least 33.
   
         Note that updating a library or application's compileSdkVersion (which
         allows newer APIs to be used) can be done separately from updating
         targetSdkVersion (which opts the app in to new runtime behavior) and
         minSdkVersion (which determines which devices the app can be installed
         on).

In addition to the dependency update commits, a few additional fix related commits were added to fix a few API updates on the gooogle.exoplayer library itself. see below:

  1. Resolve player event listener compilation error on media preview.
  2. Resolve extractor media source error on exoplayer utils.
  3. Resolve default http data source factory error on exoplayer utils.
  4. Resolve create media source error on exoplayer utils.

And in addition to the above fixes, a few more analysis related commits were added to resolve new API deprecations on the gooogle.exoplayer library itself. see below:

  1. Resolve player view deprecation warning on media preview.
  2. Resolve simple exoplayer deprecation warning on media preview.
  3. Resolve on loading changed deprecation warn on media preview.
  4. Resolve prepare deprecation warn on media preview.

Also, an androidx.recyclerview deprecation got suppressed, due to a transitive dependency update on RecyclerView, and in order to unblock this PR, see below:

  1. Suppress recyclerview adapter position deprecation warning.

Finally, a couple of additional commits were added to resolve a couple of remaining minor warnings related to gooogle.exoplayer and a fix commit for a CheckDuplicatesRunnable UI test related failure:

  1. Change build http data source function visibility to private.
  2. Remove the deprecation suppression from exoplayer utils.
  3. Fix failure while executing check duplicates runnable for ui tests.

PS: @fluiddot I added you as the main reviewer, that is, in addition to the @wordpress-mobile/apps-infrastructure team itself, but not entirely randomly as this ExoPlayer, or (probably) any such update, requires an update on ExoPlayer on the Gutenberg side too. For more info see Gutenberg Crash Stack Trace below, but also this e2ePublishSimplePost UI test that is failing on Firebase Test Lab.

Let me know if you or any other member of the Sparrow team can pick-up this work to help unblock and then sign-off on that change for WPAndroid. In the hope to make your life a bit easier with this update, that is, on the Gutenberg side, please refer to the commits above as I tried to break it down per change, providing enough details per commit description, so as to make this update a bit more manageable for you. 🙇

FYI: Last time we did something similar was via this Drop Jetifier PR where @mchowning helped us on the ExoPlayer update (see comment). We would probably need something similar for this dependency update too.

Gutenberg Crash Stack Trace
E  Failed to create NativeModule "UIManager"
     java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/exoplayer2/Player$EventListener;
        at com.brentvatne.react.ReactVideoPackage.createViewManagers(ReactVideoPackage.java:42)
        at com.facebook.react.ReactInstanceManager.getOrCreateViewManagers(ReactInstanceManager.java:928)
        at com.swmansion.reanimated.ReanimatedPackage.createUIManager(ReanimatedPackage.java:75)
        at com.swmansion.reanimated.ReanimatedPackage.getModule(ReanimatedPackage.java:31)
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:159)
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:147)
        at com.facebook.react.bridge.ModuleHolder.create(ModuleHolder.java:191)
        at com.facebook.react.bridge.ModuleHolder.getModule(ModuleHolder.java:156)
        at com.facebook.react.bridge.NativeModuleRegistry.getModule(NativeModuleRegistry.java:172)
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:502)
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:478)
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:89)
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:47)
        at com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1240)
        at com.facebook.react.ReactInstanceManager.setupReactContext(ReactInstanceManager.java:1182)
        at com.facebook.react.ReactInstanceManager.access$1600(ReactInstanceManager.java:136)
        at com.facebook.react.ReactInstanceManager$5$2.run(ReactInstanceManager.java:1136)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
        at java.lang.Thread.run(Thread.java:1012)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.exoplayer2.Player$EventListener" on path: DexPathList[[zip file "/data/app/~~au930UZytTbz2e25uhVJXQ==/com.jetpack.android.beta-LO07YZj9sQu4rC9_tiBVsA==/base.apk"],nativeLibraryDirectories=[/data/app/~~au930UZytTbz2e25uhVJXQ==/com.jetpack.android.beta-LO07YZj9sQu4rC9_tiBVsA==/lib/arm64, /data/app/~~au930UZytTbz2e25uhVJXQ==/com.jetpack.android.beta-LO07YZj9sQu4rC9_tiBVsA==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.brentvatne.react.ReactVideoPackage.createViewManagers(ReactVideoPackage.java:42) 
        at com.facebook.react.ReactInstanceManager.getOrCreateViewManagers(ReactInstanceManager.java:928) 
        at com.swmansion.reanimated.ReanimatedPackage.createUIManager(ReanimatedPackage.java:75) 
        at com.swmansion.reanimated.ReanimatedPackage.getModule(ReanimatedPackage.java:31) 
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:159) 
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:147) 
        at com.facebook.react.bridge.ModuleHolder.create(ModuleHolder.java:191) 
        at com.facebook.react.bridge.ModuleHolder.getModule(ModuleHolder.java:156) 
        at com.facebook.react.bridge.NativeModuleRegistry.getModule(NativeModuleRegistry.java:172) 
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:502) 
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:478) 
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:89) 
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:47) 
        at com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1240) 
        at com.facebook.react.ReactInstanceManager.setupReactContext(ReactInstanceManager.java:1182) 
        at com.facebook.react.ReactInstanceManager.access$1600(ReactInstanceManager.java:136) 
        at com.facebook.react.ReactInstanceManager$5$2.run(ReactInstanceManager.java:1136) 
        at android.os.Handler.handleCallback(Handler.java:942) 
        at android.os.Handler.dispatchMessage(Handler.java:99) 
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27) 
        at android.os.Looper.loopOnce(Looper.java:201) 
        at android.os.Looper.loop(Looper.java:288) 
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228) 
        at java.lang.Thread.run(Thread.java:1012) 
E  FATAL EXCEPTION: mqt_native_modules
     Process: com.jetpack.android.beta, PID: 8150
     java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/exoplayer2/Player$EventListener;
        at com.brentvatne.react.ReactVideoPackage.createViewManagers(ReactVideoPackage.java:42)
        at com.facebook.react.ReactInstanceManager.getOrCreateViewManagers(ReactInstanceManager.java:928)
        at com.swmansion.reanimated.ReanimatedPackage.createUIManager(ReanimatedPackage.java:75)
        at com.swmansion.reanimated.ReanimatedPackage.getModule(ReanimatedPackage.java:31)
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:159)
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:147)
        at com.facebook.react.bridge.ModuleHolder.create(ModuleHolder.java:191)
        at com.facebook.react.bridge.ModuleHolder.getModule(ModuleHolder.java:156)
        at com.facebook.react.bridge.NativeModuleRegistry.getModule(NativeModuleRegistry.java:172)
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:502)
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:478)
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:89)
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:47)
        at com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1240)
        at com.facebook.react.ReactInstanceManager.setupReactContext(ReactInstanceManager.java:1182)
        at com.facebook.react.ReactInstanceManager.access$1600(ReactInstanceManager.java:136)
        at com.facebook.react.ReactInstanceManager$5$2.run(ReactInstanceManager.java:1136)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
        at java.lang.Thread.run(Thread.java:1012)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.exoplayer2.Player$EventListener" on path: DexPathList[[zip file "/data/app/~~au930UZytTbz2e25uhVJXQ==/com.jetpack.android.beta-LO07YZj9sQu4rC9_tiBVsA==/base.apk"],nativeLibraryDirectories=[/data/app/~~au930UZytTbz2e25uhVJXQ==/com.jetpack.android.beta-LO07YZj9sQu4rC9_tiBVsA==/lib/arm64, /data/app/~~au930UZytTbz2e25uhVJXQ==/com.jetpack.android.beta-LO07YZj9sQu4rC9_tiBVsA==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.brentvatne.react.ReactVideoPackage.createViewManagers(ReactVideoPackage.java:42) 
        at com.facebook.react.ReactInstanceManager.getOrCreateViewManagers(ReactInstanceManager.java:928) 
        at com.swmansion.reanimated.ReanimatedPackage.createUIManager(ReanimatedPackage.java:75) 
        at com.swmansion.reanimated.ReanimatedPackage.getModule(ReanimatedPackage.java:31) 
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:159) 
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:147) 
        at com.facebook.react.bridge.ModuleHolder.create(ModuleHolder.java:191) 
        at com.facebook.react.bridge.ModuleHolder.getModule(ModuleHolder.java:156) 
        at com.facebook.react.bridge.NativeModuleRegistry.getModule(NativeModuleRegistry.java:172) 
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:502) 
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:478) 
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:89) 
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:47) 
        at com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1240) 
        at com.facebook.react.ReactInstanceManager.setupReactContext(ReactInstanceManager.java:1182) 
        at com.facebook.react.ReactInstanceManager.access$1600(ReactInstanceManager.java:136) 
        at com.facebook.react.ReactInstanceManager$5$2.run(ReactInstanceManager.java:1136) 
        at android.os.Handler.handleCallback(Handler.java:942) 
        at android.os.Handler.dispatchMessage(Handler.java:99) 
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27) 
        at android.os.Looper.loopOnce(Looper.java:201) 
        at android.os.Looper.loop(Looper.java:288) 
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228) 
        at java.lang.Thread.run(Thread.java:1012) 

To test:

  1. See the dependency tree diff result and verify correctness.
  2. Thoroughly smoke test any exoplayer related functionality on both, the WordPress and Jetpack apps, and see if they both work as expected.
  3. In addition to the above smoke test, you can expand the below and follow the inner and more explicit test steps within:
1. Image Preview
  • Go to Post screen.
  • Edit a new post, add an Image block and then an image into it.
  • Having added an image to the image block, click on the image block and then again on the image within.
  • This will launch Media Preview screen and the image should be previewed.
  • Verify that the Image Preview is working as expected, that rotating the device works and finally that clicking back navigates you back to the post edit screen.
2. Video Preview
  • Go to Post screen.
  • Edit a new post, add an Video block but don't add a video into it just yet.
  • Find the Video block, click on ADD VIDEO and then Choose from device to choose a video.
  • From the list of available videos to choose from screen, click on the Play button on the center on any video. FYI: If you don't click on the center, this video will get selected for use, but it won't play.
  • This will launch Media Preview screen and the video should start playing.
  • Verify that the Video Preview is working as expected, that rotating the device works and finally that clicking back navigates you back to the list of available videos to choose from screen.

Warning (⚠️): Note the fact that the app will crash unless Gutenberg's ExoPlayer version get to be updated to 2.18.1 as well.


Merge instructions

  • Wait for the Mobile Gutenberg team to make the equivalent change on the gutenberg and gutenberg-mobile.
  • Update PR's gutenbergMobileVersion version with that version that has its ExoPlayer update to 2.18.1 as well.
  • Test this PR again following the above testing instruction and verify correctness.
  • Remove [PR] Not Ready For Merge] label.
  • Prepare and update PR to a Ready for review state.
  • Merge PR to trunk.

Regression Notes

  1. Potential unintended areas of impact

    • Potential breakage or misbehaviour on any or all exoplayer related app functionalities, like previewing images/videos on posts.
    • Some of the transitive dependencies added might be causing some kind of misbehaviour.
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • See To test section.
  3. What automated tests I added (or what prevented me from doing so)

    • N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

It seems that this exclusion is no longer necessary and as such removed
to make this dependency a bit more maintainable going forward, that is,
without needing to care about any exclusions.
It is generally recommended that transitively used dependencies should
be declared directly.
Release Notes: https://github.com/google/ExoPlayer/releases/tag/r2.18.1

------------------------------------------------------------------------

Note that the '2.18.2' update requires libraries and applications that
depend on it to compile against version 33 (Android 13) or later of the
Android APIs. However, this project is currently compiled against
android-31 (Android 12).

Thus, until the 'compileSdkVersion' of this project gets updated to '33'
updating to '2.18.2' isn't possible.

------------------------------------------------------------------------
This started appearing because, as part of the 'ExoPlayer' update to
'2.18.1', its transient 'RecyclerView' dependency got updated
as well, from '1.1.0' to '1.2.1', which caused this deprecation warning.

Warning Message: "'getter for adapterPosition: Int' is deprecated.
Deprecated in Java"

Explanation: "This method is confusing when adapters nest other
adapters. If you are calling this in the context of an Adapter, you
probably want to call getBindingAdapterPosition or if you want the
position as RecyclerView sees it, you should call
getAbsoluteAdapterPosition."

This deprecated warning is suppressed, that is, instead of being
resolved, since a resolution is out of the scope of this 'ExoPlayer'
update.

For more info see:
- RecyclerView.ViewHolder#getAdapterPosition (Doc):
https://developer.android.com/reference/androidx/recyclerview/widget/
RecyclerView.ViewHolder#getAdapterPosition()
Error Message: "InjectProcessingStep was unable to process 'mMediaStore'
because 'com.google.android.exoplayer2.Player.EventListener' could not
be resolved."

As part of the 'ExoPlayer' version '2.17.0' the deprecated
'Player.EventListener' got removed in favor of 'Player.Listener'.

Release Notes: https://github.com/google/ExoPlayer/releases/tag/r2.17.0

In addition to that, this changes adds an extra warnings because of the
'onLoadingChanged(...)' method, which is now deprecated. However,
resolving this change will happen in a separate subsequent commit.
First, all other compilation errors will get resolved, the app will be
tested for correctness and then all warnings will get resolved too.

Warning Message: "Overrides deprecated method in 'com.google.android
.exoplayer2.Player.Listener'"

Explanation: "Use onIsLoadingChanged(boolean) instead."

For more info see:
- exoplayer2.Player.Listener#onIsLoadingChanged (Doc):
https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/
Player.Listener.html#onIsLoadingChanged(boolean)
Error Message: "e: /Users/.../WordPress-Android/WordPress/src/main/java/
org/wordpress/android/ui/media/ExoPlayerUtils.kt: (10, 45):
Unresolved reference: ExtractorMediaSource"

As part of the 'ExoPlayer' version '2.14.0' the deprecated
'ExtractorMediaSource' got removed in favor of 'ProgressiveMediaSource'.

Release Notes: https://github.com/google/ExoPlayer/releases/tag/r2.14.0
Error Message: "e: /Users/.../WordPress-Android/WordPress/src/main/java/
org/wordpress/android/ui/media/ExoPlayerUtils.kt: (19, 47):
Unresolved reference: DefaultHttpDataSourceFactory"

As part of the 'ExoPlayer' version '2.16.0' the deprecated
'DefaultHttpDataSourceFactory' got removed in favor of
'DefaultHttpDataSource.Factory'.

Release Notes: https://github.com/google/ExoPlayer/releases/tag/r2.16.0

PS: Also, the 'DashMediaSource.Factory' import got update to resolve
'Factory' related import conflicts.
Error Message: "e: /Users/.../WordPress-Android/WordPress/src/main/java/
org/wordpress/android/ui/media/ExoPlayerUtils.kt: (53, 18): None of the
following functions can be called with the arguments supplied: "

As part of the 'ExoPlayer' version '2.17.0' the deprecated
'MediaSourceFactory#createMediaSource(Uri)' got removed in favor of
'MediaSourceFactory#createMediaSource(MediaItem)'.

Release Notes: https://github.com/google/ExoPlayer/releases/tag/r2.17.0
This 'buildHttpDataSourceFactory(...)' fucntion doesn't need to be
public.
This suppression is no longer necessary as all the deprecation were no
longer applicable. Instead, those deprecated APIs got removed and the
project wasn't compiling anymore. After fixing the compilation errors,
the deprecated warnings were no longer applicable.
Warning Message: "'com.google.android.exoplayer2.ui.PlayerView'
is deprecated "

Explanation: "Use StyledPlayerView instead."

For more info see:
- exoplayer2.ui.PlayerView (Doc):
https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/ui/
PlayerView.html
Warning Message: "'com.google.android.exoplayer2.SimpleExoPlayer'
is deprecated"

Explanation: "Use ExoPlayer instead."

For more info see:
- exoplayer2.SimpleExoPlayer (Doc):
https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/
SimpleExoPlayer.html
Warning Message: "Overrides deprecated method in
'com.google.android.exoplayer2.Player.Listener'"

Explanation: "Use onIsLoadingChanged(boolean) instead."

For more info see:
- exoplayer2.Player.Listener#onIsLoadingChanged (Doc):
https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/
Player.Listener.html#onIsLoadingChanged(boolean)
Warning Message: "'prepare(com.google.android.exoplayer2.source.
MediaSource)' is deprecated "

Explanation: "Use setMediaSource(MediaSource) and
Player.prepare() instead."

For more info see:
- exoplayer2.ExoPlayer#prepare (Doc):
https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/
ExoPlayer.html#prepare(com.google.android.exoplayer2.source.MediaSource)
@ParaskP7 ParaskP7 added this to the Future milestone Feb 9, 2023
@ParaskP7 ParaskP7 requested review from fluiddot and a team February 9, 2023 14:51
@ParaskP7 ParaskP7 self-assigned this Feb 9, 2023
@ParaskP7 ParaskP7 changed the title [Dependency Updates] Update googleExoPlayerVersion to 2.18.1 ⚠️ [Dependency Updates] Update googleExoPlayerVersion to 2.18.1 Feb 9, 2023
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 9, 2023

WordPress📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr17936-93feeee.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppWordPress
Build FlavorJalapeno
Build TypeDebug
Commit93feeee
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 9, 2023

Jetpack📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr17936-93feeee.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppJetpack
Build FlavorJalapeno
Build TypeDebug
Commit93feeee
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

Excluding the 'org.checkerframework' group and its 'checker' module
seems to be fixing this 'CheckDuplicatesRunnable' failure.

------------------------------------------------------------------------
* What went wrong:
Execution failed for task ':WordPress:checkWordpressWasabiDebug
 AndroidTestDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal
 .tasks.CheckDuplicatesRunnable
   > Duplicate class org.checkerframework.checker.compilermsgs.qual
     .CompilerMessageKey found in modules checker-3.1 (org
     .checkerframework:checker:3.1.1) and checker-qual-3.12.0
     (org.checkerframework:checker-qual:3.12.0)
   ...
------------------------------------------------------------------------
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 16, 2023

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr17936-4ec3214
Commit4ec3214
Direct Downloadwordpress-prototype-build-pr17936-4ec3214.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 16, 2023

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr17936-4ec3214
Commit4ec3214
Direct Downloadjetpack-prototype-build-pr17936-4ec3214.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

Found 1 violations:

The PR caused the following dependency changes:

 +--- project :libs:editor
 |    +--- org.wordpress:aztec:{strictly v1.6.3} -> v1.6.3
 |    |    \--- androidx.legacy:legacy-support-v4:1.0.0
-|    |         \--- androidx.media:media:1.0.0 -> 1.2.1
-|    |              +--- androidx.collection:collection:1.1.0 (*)
-|    |              \--- androidx.core:core:1.3.0 -> 1.8.0 (*)
+|    |         \--- androidx.media:media:1.0.0 -> 1.4.3
+|    |              +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
+|    |              +--- androidx.collection:collection:1.1.0 (*)
+|    |              \--- androidx.core:core:1.6.0 -> 1.8.0 (*)
 |    \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.92.0
 |         \--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-5
-|              +--- com.google.android.exoplayer:exoplayer:2.13.3
-|              |    +--- com.google.android.exoplayer:exoplayer-core:2.13.3
-|              |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-|              |    |    +--- com.google.android.exoplayer:exoplayer-common:2.13.3
-|              |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-|              |    |    |    \--- com.google.guava:guava:27.1-android
-|              |    |    |         +--- com.google.guava:failureaccess:1.0.1
-|              |    |    |         \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
-|              |    |    \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
-|              |    |         +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-|              |    |         \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
-|              |    +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
-|              |    |    +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-|              |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-|              |    +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
-|              |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-|              |    |    \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-|              |    +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
-|              |    |    +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-|              |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-|              |    +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
-|              |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-|              |    |    \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-|              |    \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
-|              |         +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-|              |         +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-|              |         +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.2.1 (*)
-|              |         \--- androidx.media:media:1.2.1 (*)
+|              +--- com.google.android.exoplayer:exoplayer:2.13.3 -> 2.18.1
+|              |    +--- com.google.android.exoplayer:exoplayer-common:2.18.1
+|              |    |    +--- androidx.annotation:annotation:1.3.0
+|              |    |    \--- com.google.guava:guava:31.0.1-android
+|              |    |         +--- com.google.guava:failureaccess:1.0.1
+|              |    |         \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
+|              |    +--- com.google.android.exoplayer:exoplayer-database:2.18.1
+|              |    |    +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+|              |    |    \--- androidx.annotation:annotation:1.3.0
+|              |    +--- com.google.android.exoplayer:exoplayer-datasource:2.18.1
+|              |    |    +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+|              |    |    +--- com.google.android.exoplayer:exoplayer-database:2.18.1 (*)
+|              |    |    \--- androidx.annotation:annotation:1.3.0
+|              |    +--- com.google.android.exoplayer:exoplayer-decoder:2.18.1
+|              |    |    +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+|              |    |    \--- androidx.annotation:annotation:1.3.0
+|              |    +--- com.google.android.exoplayer:exoplayer-extractor:2.18.1
+|              |    |    +--- androidx.annotation:annotation:1.3.0
+|              |    |    +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+|              |    |    \--- com.google.android.exoplayer:exoplayer-decoder:2.18.1 (*)
+|              |    +--- com.google.android.exoplayer:exoplayer-core:2.18.1
+|              |    |    +--- androidx.annotation:annotation:1.3.0
+|              |    |    +--- androidx.core:core:1.7.0 -> 1.8.0 (*)
+|              |    |    +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+|              |    |    +--- com.google.android.exoplayer:exoplayer-datasource:2.18.1 (*)
+|              |    |    +--- com.google.android.exoplayer:exoplayer-decoder:2.18.1 (*)
+|              |    |    +--- com.google.android.exoplayer:exoplayer-extractor:2.18.1 (*)
+|              |    |    \--- com.google.android.exoplayer:exoplayer-database:2.18.1 (*)
+|              |    +--- com.google.android.exoplayer:exoplayer-dash:2.18.1
+|              |    |    +--- com.google.android.exoplayer:exoplayer-core:2.18.1 (*)
+|              |    |    \--- androidx.annotation:annotation:1.3.0
+|              |    +--- com.google.android.exoplayer:exoplayer-hls:2.18.1
+|              |    |    +--- androidx.annotation:annotation:1.3.0
+|              |    |    \--- com.google.android.exoplayer:exoplayer-core:2.18.1 (*)
+|              |    +--- com.google.android.exoplayer:exoplayer-rtsp:2.18.1
+|              |    |    +--- androidx.annotation:annotation:1.3.0
+|              |    |    \--- com.google.android.exoplayer:exoplayer-core:2.18.1 (*)
+|              |    +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.1
+|              |    |    +--- com.google.android.exoplayer:exoplayer-core:2.18.1 (*)
+|              |    |    \--- androidx.annotation:annotation:1.3.0
+|              |    \--- com.google.android.exoplayer:exoplayer-ui:2.18.1
+|              |         +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+|              |         +--- androidx.annotation:annotation:1.3.0
+|              |         +--- androidx.recyclerview:recyclerview:1.2.1 (*)
+|              |         \--- androidx.media:media:1.4.3 (*)
-|              +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
+|              +--- androidx.media:media:1.1.0 -> 1.4.3 (*)
 |              \--- com.google.android.exoplayer:extension-okhttp:2.13.3
-|                   \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+|                   \--- com.google.android.exoplayer:exoplayer-common:2.13.3 -> 2.18.1 (*)
 +--- org.wordpress:login:1.0.0
-|    \--- androidx.media:media:1.2.1 (*)
+|    \--- androidx.media:media:1.2.1 -> 1.4.3 (*)
-\--- com.google.android.exoplayer:exoplayer:2.13.3 (*)
++--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
++--- com.google.android.exoplayer:exoplayer-core:2.18.1 (*)
++--- com.google.android.exoplayer:exoplayer-dash:2.18.1 (*)
++--- com.google.android.exoplayer:exoplayer-hls:2.18.1 (*)
++--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.1 (*)
++--- com.google.android.exoplayer:exoplayer-ui:2.18.1 (*)
+\--- com.google.android.exoplayer:exoplayer:2.18.1 (*)

Please review and act accordingly

@ParaskP7
Copy link
Contributor Author

👋 @fluiddot !

A friendly reminder on this (internal discussion: C6UJ0KRKQ/p1675956455070109).

Do you think that someone from the Gutenberg team can take a look at it at some point in order to avoid keeping this PR open for much longer, risking it becoming stale (it has been already more than 2 months)? 🙏 😱 🙇

@fluiddot
Copy link
Contributor

👋 @fluiddot !

A friendly reminder on this (internal discussion: C6UJ0KRKQ/p1675956455070109).

Hey @ParaskP7 👋 ! Sorry for not being able to check this sooner 🙇.

Do you think that someone from the Gutenberg team can take a look at it at some point in order to avoid keeping this PR open for much longer, risking it becoming stale (it has been already more than 2 months)? 🙏 😱 🙇

I agree it's not ideal to keep this open much longer, but I'm not sure if we have the bandwidth to take a look soon. I'd like to defer this to @twstokes in case we can prioritize it in the next Sprint.

@ParaskP7
Copy link
Contributor Author

👋 @fluiddot and thanks so much for the reply! 🙇

I agree it's not ideal to keep this open much longer, but I'm not sure if we have the bandwidth to take a look soon. I'd like to defer this to @twstokes in case we can prioritize it in the next Sprint.

Sure, and of course, I understand. 👍

@twstokes do you think this update can be prioritized at any point in the future, next sprint or otherwise? I personally think we better update ExoPlayer at some point (it is already way behind). But, if you think that this update is not worth the GB investment I can drop it and we'll revisit it again at a later point in time. Wdyt? 🤔

@twstokes
Copy link
Contributor

👋 Hey @fluiddot and @ParaskP7, thanks for looping me in!

@twstokes do you think this update can be prioritized at any point in the future, next sprint or otherwise? I personally think we better update ExoPlayer at some point (it is already way behind). But, if you think that this update is not worth the GB investment I can drop it and we'll revisit it again at a later point in time. Wdyt? 🤔

Due to the recent work to update the target SDK version to 33 / Android 13, should effort be put into bumping it to 2.18.2 (or higher)?

FYI, our team is planning to update GBM to use Android 13 in the upcoming weeks.

@ParaskP7
Copy link
Contributor Author

👋 @twstokes and thanks for the reply!

Due to the #18172, should effort be put into bumping it to 2.18.2 (or higher)?

Since the compileSdkVersion = 33 upgrade work is complete on WPAndroid, we can aim for higher, the latest version of ExoPlayer is the 2.18.6, so I would recommend to target that and see how it goes.

FYI: The only caveat to that is that you would need to upgrade compileSdkVersion = 33 on the GB side as well (if not already done) before you will be able to use any ExoPlayer version above 2.18.1.

FYI, our team is planning to update wordpress-mobile/gutenberg-mobile#5556 in the upcoming weeks.

Awesome, looking forward to that as it has the potential to unlock other updates as well (ie. latest ExoPlayer updates). 🥇

@fluiddot
Copy link
Contributor

Hey @ParaskP7 👋 , as part of the ongoing effort of upgrading Android 13 in Gutenberg Mobile, I took a quick look at this.

Gutenberg Mobile uses the Exoplayer library via the react-native-video library. However, we don't use the original repository but a forked version with some tweaks. We use the latest version (5.2.0) but I noticed that the Exoplayer version is still 2.13.3 (reference) 😬. I see that only in 6.0 alpha versions (specifically, v6.0.0-alpha.2) Exoplayer was updated to a newer version, the latest is 2.18.1 (reference).

That said, I see the following options in order to unblock this PR:

  1. Wait until react-native-video releases the 6.0 version: It's unclear when this will happen but based on the alpha releases and the lack of support/contributions, this might take some time. It has been in alpha since June 2022.
  2. Use a 6.0 alpha version of react-native-video: Probably the best option in order to unlock the PR, although using an alpha version might be risky.
  3. Bump the Exoplayer manually in the forked repository: I understand this won't work out-of-the-box and we'd need to update parts of the code.
  4. Replace react-native-video with a custom solution provided by the host apps (i.e. WPAndroid): This option would give us full control over the Exoplayer version but might be a big project.

Since none of the above options seem optimal, I'm wondering how urgent is updating Exoplayer:

  • Is it blocking any project?
  • Is it needed in order to upgrade Android 13?
  • Do we foresee any future blockers if we delay the update?

@ParaskP7
Copy link
Contributor Author

👋 @fluiddot and thank you for the reply!

Hey @ParaskP7 👋 , as part of the ongoing effort of upgrading Android 13 in Gutenberg Mobile, I took a quick look at this.

Thank you for taking a look! 🙇

Gutenberg Mobile uses the Exoplayer library via the react-native-video library. However, we don't use the original repository but a forked version with some tweaks. We use the latest version (5.2.0) but I noticed that the Exoplayer version is still 2.13.3 (reference) 😬.

Yes, yes! 😬

I see that only in 6.0 alpha versions (specifically, v6.0.0-alpha.2) Exoplayer was updated to a newer version, the latest is 2.18.1 (reference).

Good find! 🌟

That said, I see the following options in order to unblock this PR:

🙏 👀 🤔

  1. Wait until react-native-video releases the 6.0 version: It's unclear when this will happen but based on the alpha releases and the lack of support/contributions, this might take some time. It has been in alpha since June 2022.

Yea, from the (quick) looks of it, this might be our best (only?) option, but as you said, it's a long shot (lack of support/contributions) and thus we can't really depend on it happening anytime soon... 🤷

  1. Use a 6.0 alpha version of react-native-video: Probably the best option in order to unlock the PR, although using an alpha version might be risky.

Yea, this might be risky indeed, and to be honest, from the (quick) looks of it, I wouldn't recommend. 🙅

  1. Bump the Exoplayer manually in the forked repository: I understand this won't work out-of-the-box and we'd need to update parts of the code.

Yea, that might be a lot of work and sound a bit of risky too, I wouldn't recommend. 🙅

  1. Replace react-native-video with a custom solution provided by the host apps (i.e. WPAndroid): This option would give us full control over the Exoplayer version but might be a big project.

True, this would give us the most flexibility with ExoPlayer, but as you said, it sound like it might end up being a big project, I wouldn't recommend. 🙅

Since none of the above options seem optimal, I'm wondering how urgent is updating Exoplayer:

🙏 🤔 👀

Is it blocking any project?

My understanding is that this isn't blocking any project. But then, I don't have a clear picture of any future projects that the products team are and will be working against.

FYI: Me checking out ExoPlayer's usages (back then) and then testing those (see testing instruction above), it seems that it is being used only in two places (Image Preview + Video Preview), that is of course, excluding any usages of ExoPlayer via GB itself.

Is it needed in order to upgrade Android 13?

As far as I understand no, maybe this will change with Android 14, but I doubt it.

FYI: Android 13 and the compileSdk = 33 version comes into play only if we update the library and the fact that we won't be able to update unless we use a more recent SDK (which we anyway already do).

PS: Apart from that, to the best of my knowledge, Android 13 and ExoPlayer are unrelated.

Do we foresee any future blockers if we delay the update?

Not sure, it depends how much ExoPlayer will get interconnected with future Android updates, compileSdk, targetSdk, and whether any other correlated library update will somehow transitively try to update ExoPlayer, causing compile, or worse, runtime crashes, that is, unless explicitly called-out, tested and forcibly excluded from being transitively updated, which might cause another chain of reactions on that library itself. 🤷

FYI: Also, we now have Media3, and ExoPlayer is the default implementation of the Player interface (see here). I am not sure how this will come to play in the future, that is, when one would need to use Media3 for a specific feature, I really can't predict...


Having said the above, if you too think this update is not urgent, you can totally ignore it, at least for now. 👍

My effort was to try and update ExoPlayer, get us talking about it, and identify any blockers that might block us from doing so (now and in the future). We actually did that, just now, and to me, for now, this is more than enough. Wdyt? 🤔

In the future, if anyone would try to update ExoPlayer again, or work with it directly on WPAndroid, not via GB, they will have a better picture of this library's limitations. 💯

@fluiddot
Copy link
Contributor

Having said the above, if you too think this update is not urgent, you can totally ignore it, at least for now. 👍

My effort was to try and update ExoPlayer, get us talking about it, and identify any blockers that might block us from doing so (now and in the future). We actually did that, just now, and to me, for now, this is more than enough. Wdyt? 🤔

In the future, if anyone would try to update ExoPlayer again, or work with it directly on WPAndroid, not via GB, they will have a better picture of this library's limitations. 💯

Sounds good to me 👍, if there's no urgency on merging this PR or need of unblocking something else, I agree on pausing it for now. In the future, if there's a need for upgrading this library, we could resume it by exploring the options we shared.
@ParaskP7 thank you so much for working on this and for your effort in moving this forward ❤️ .

@ParaskP7
Copy link
Contributor Author

Sounds good to me 👍, if there's no urgency on merging this PR or need of unblocking something else, I agree on pausing it for now.

Deal, I'll then go ahead and close this (for now)! 🤝

In the future, if there's a need for upgrading this library, we could resume it by exploring the options we shared.

👍

@ParaskP7 thank you so much for working on this and for your effort in moving this forward ❤️ .

Thank YOU @fluiddot for helping me resolve this, one way or another! ❤️ 💯 🥇

@ParaskP7 ParaskP7 closed this May 18, 2023
@ParaskP7 ParaskP7 deleted the deps/update-google-exoplayer-to-2.18.1 branch May 31, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants