Skip to content

Commit

Permalink
Fix: Resolve extractor media source error on exoplayer utils
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ParaskP7 committed Feb 9, 2023
1 parent 4417867 commit f9a237f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import android.net.Uri
import com.google.android.exoplayer2.C
import com.google.android.exoplayer2.C.ContentType
import com.google.android.exoplayer2.offline.FilteringManifestParser
import com.google.android.exoplayer2.source.ExtractorMediaSource
import com.google.android.exoplayer2.source.ProgressiveMediaSource
import com.google.android.exoplayer2.source.MediaSource
import com.google.android.exoplayer2.source.dash.DashMediaSource.Factory
import com.google.android.exoplayer2.source.dash.manifest.DashManifestParser
Expand Down Expand Up @@ -56,7 +56,7 @@ class ExoPlayerUtils @Inject constructor(
C.TYPE_HLS -> HlsMediaSource.Factory(defaultDataSourceFactory)
.setPlaylistParserFactory(DefaultHlsPlaylistParserFactory())
.createMediaSource(uri)
C.TYPE_OTHER -> ExtractorMediaSource.Factory(defaultDataSourceFactory).createMediaSource(uri)
C.TYPE_OTHER -> ProgressiveMediaSource.Factory(defaultDataSourceFactory).createMediaSource(uri)
else -> {
throw IllegalStateException("$UNSUPPORTED_TYPE $type")
}
Expand Down

0 comments on commit f9a237f

Please sign in to comment.