Allow DRM classes to be removed during APK shrinking
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
This is a followup to https://github.com/google/ExoPlayer/issues/7937
After migrating to 2.12 and using R8 in full mode there's a big dex size regression due to DRM handling. (Approx 115K)
Paste from previous issue:
If I use following code the DEX increase by 115K so even more than previously probably because of using the player playlist api.
```
SimpleExoPlayer.Builder(applicationContext, AudioOnlyRendererFactory(applicationContext),
{ arrayOf(Mp3Extractor(), FlacExtractor(), OggExtractor(), WavExtractor(), MatroskaExtractor(), Mp4Extractor()) })
.setMediaSourceFactory(
DefaultMediaSourceFactory(DefaultDataSourceFactory(applicationContext, null, RemoteMediaItemDataSourceFactory(applicationContext, this)))
.setDrmSessionManager(DrmSessionManager.getDummyDrmSessionManager())
)
.setTrackSelector(trackSelector)
.build()
```
Not setting setMediaSourceFactory to SimpleExoPlayer and using addMediaSource on Player with
```
ProgressiveMediaSource.Factory(dataSourceFactory, extractorsFactory)
.setDrmSessionManager(DrmSessionManager.getDummyDrmSessionManager())
.createMediaSource(MediaItem.Builder().setUri(finalUri).build())
```
does gain back those 115K dex.
Contributor guide
Assessment
This issue has not been assessed yet.