diff --git a/app/src/main/java/com/nuvio/tv/ui/screens/player/PlayerRuntimeControllerInitialization.kt b/app/src/main/java/com/nuvio/tv/ui/screens/player/PlayerRuntimeControllerInitialization.kt index 6770ada7..8af8b9f2 100644 --- a/app/src/main/java/com/nuvio/tv/ui/screens/player/PlayerRuntimeControllerInitialization.kt +++ b/app/src/main/java/com/nuvio/tv/ui/screens/player/PlayerRuntimeControllerInitialization.kt @@ -241,7 +241,6 @@ internal fun PlayerRuntimeController.initializePlayer( onPlaybackSpeedAwareAudioOutputProviderCreated = { playbackSpeedAwareAudioOutputProvider = it } ).setExtensionRendererMode(playerSettings.decoderPriority) .setMapDV7ToHevc(playerSettings.mapDV7ToHevc || forceDv7ToHevc) - .enableMediaCodecVideoRendererDurationToProgressUsIfAvailable() if (showLoadingStatus) _uiState.update { it.copy(loadingMessage = context.getString(R.string.player_loading_building)) } val buildDefaultPlayer = { @@ -256,7 +255,6 @@ internal fun PlayerRuntimeController.initializePlayer( .setRenderersFactory(renderersFactory) .setLoadControl(loadControl) .setReleaseTimeoutMs(3000) - .enableDynamicSchedulingIfAvailable() .build() } @@ -267,7 +265,6 @@ internal fun PlayerRuntimeController.initializePlayer( .setTrackSelector(trackSelector!!) .setMediaSourceFactory(DefaultMediaSourceFactory(playerDataSourceFactory, extractorsFactory)) .setReleaseTimeoutMs(3000) - .enableDynamicSchedulingIfAvailable() .buildWithAssSupportCompat( context = context, renderType = libassRenderType, @@ -834,30 +831,3 @@ private class SubtitleOffsetRenderer( } } -private fun DefaultRenderersFactory.enableMediaCodecVideoRendererDurationToProgressUsIfAvailable(): DefaultRenderersFactory { - runCatching { - javaClass - .getMethod("setEnableMediaCodecVideoRendererDurationToProgressUs", java.lang.Boolean.TYPE) - .invoke(this, true) - }.onFailure { - Log.d( - PlayerRuntimeController.TAG, - "Media3 duration-to-progress optimization unavailable: ${it.message}" - ) - } - return this -} - -private fun ExoPlayer.Builder.enableDynamicSchedulingIfAvailable(): ExoPlayer.Builder { - runCatching { - javaClass - .getMethod("experimentalSetDynamicSchedulingEnabled", java.lang.Boolean.TYPE) - .invoke(this, true) - }.onFailure { - Log.d( - PlayerRuntimeController.TAG, - "Media3 dynamic scheduling unavailable: ${it.message}" - ) - } - return this -}