diff --git a/.gitignore b/.gitignore
index 987fea76047..0c9e51d195f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,6 @@
# Android generated
bin
gen
-libs
obj
.kotlin
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 056b47a1e82..00000000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,495 +0,0 @@
-
-
-
-
-
-
-
diff --git a/.idea/icon.svg b/.idea/icon.svg
deleted file mode 100644
index f5071cd8053..00000000000
--- a/.idea/icon.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/build.gradle b/build.gradle
index 05624ba2302..42f15c10853 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,3 +1,6 @@
+import org.jetbrains.kotlin.gradle.dsl.JvmTarget
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+
// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -42,6 +45,11 @@ allprojects {
buildDir = "${externalBuildDir}/${project.name}"
}
group = 'androidx.media3'
+ tasks.withType(KotlinCompile).configureEach {
+ compilerOptions {
+ jvmTarget = JvmTarget.JVM_1_8
+ }
+ }
}
task printReleaseArtifactIds {
diff --git a/constants.gradle b/constants.gradle
index 741c063422d..3e6cef9424c 100644
--- a/constants.gradle
+++ b/constants.gradle
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
project.ext {
- releaseVersion = '1.10.1'
+ releaseVersion = '1.10.1-local'
releaseVersionCode = 1_010_001_3_00
minSdkVersion = 23
// See https://developer.android.com/training/cars/media/automotive-os#automotive-module
diff --git a/gradlew.bat b/gradlew.bat
index ac1b06f9382..107acd32c4e 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,89 +1,89 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/libraries/cast/build.gradle b/libraries/cast/build.gradle
index 7988ace1eeb..372d9b02775 100644
--- a/libraries/cast/build.gradle
+++ b/libraries/cast/build.gradle
@@ -29,7 +29,7 @@ android {
}
kotlin {
compilerOptions {
- jvmTarget.set(JvmTarget.JVM_1_8)
+ jvmTarget.set(JvmTarget.JVM_21)
}
}
}
diff --git a/libraries/cast/proguard-rules.txt b/libraries/cast/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/cast/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/common_ktx/build.gradle b/libraries/common_ktx/build.gradle
index 9db98f92115..9b08ffaf139 100644
--- a/libraries/common_ktx/build.gradle
+++ b/libraries/common_ktx/build.gradle
@@ -22,6 +22,11 @@ apply plugin: 'kotlin-android'
android {
namespace 'androidx.media3.common.ktx'
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+ }
+
buildTypes {
debug {
testCoverageEnabled = true
@@ -39,7 +44,7 @@ android {
}
kotlin {
compilerOptions {
- jvmTarget.set(JvmTarget.JVM_1_8)
+ jvmTarget.set(JvmTarget.JVM_21)
}
}
}
diff --git a/libraries/common_ktx/proguard-rules.txt b/libraries/common_ktx/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/common_ktx/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/container/proguard-rules.txt b/libraries/container/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/container/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/database/proguard-rules.txt b/libraries/database/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/database/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/datasource_cronet/proguard-rules.txt b/libraries/datasource_cronet/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/datasource_cronet/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/datasource_rtmp/proguard-rules.txt b/libraries/datasource_rtmp/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/datasource_rtmp/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/decoder/proguard-rules.txt b/libraries/decoder/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/decoder/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/decoder_av1/build.gradle b/libraries/decoder_av1/build.gradle
index cb5773a0615..57144ccffc0 100644
--- a/libraries/decoder_av1/build.gradle
+++ b/libraries/decoder_av1/build.gradle
@@ -17,6 +17,12 @@ apply from: "$gradle.ext.androidxMediaSettingsDir/common_config.gradle"
android {
namespace 'androidx.media3.decoder.av1'
+ publishing {
+ singleVariant('release') {
+ withSourcesJar()
+ }
+ }
+
defaultConfig {
externalNativeBuild {
cmake {
@@ -42,6 +48,12 @@ if (project.file('src/main/jni/dav1d').exists()) {
}
}
+ext {
+ releaseArtifactId = 'media3-decoder-av1'
+ releaseName = 'Media3 AV1 decoder module'
+}
+apply from: '../../publish.gradle'
+
dependencies {
api project(modulePrefix + 'lib-decoder')
// TODO(b/203752526): Remove this dependency.
diff --git a/libraries/decoder_ffmpeg/build.gradle b/libraries/decoder_ffmpeg/build.gradle
index accf03ca6a5..d59f3d708f6 100644
--- a/libraries/decoder_ffmpeg/build.gradle
+++ b/libraries/decoder_ffmpeg/build.gradle
@@ -17,6 +17,12 @@ apply from: "$gradle.ext.androidxMediaSettingsDir/common_config.gradle"
android {
namespace 'androidx.media3.decoder.ffmpeg'
+ publishing {
+ singleVariant('release') {
+ withSourcesJar()
+ }
+ }
+
sourceSets {
androidTest.assets.srcDir '../test_data/src/test/assets'
}
@@ -32,6 +38,12 @@ if (project.file('src/main/jni/ffmpeg').exists()) {
// LINT.ThenChange(src/main/jni/CMakeLists.txt)
}
+ext {
+ releaseArtifactId = 'media3-decoder-ffmpeg'
+ releaseName = 'Media3 FFmpeg decoder module'
+}
+apply from: '../../publish.gradle'
+
dependencies {
api project(modulePrefix + 'lib-decoder')
// TODO(b/203752526): Remove this dependency.
diff --git a/libraries/decoder_midi/proguard-rules.txt b/libraries/decoder_midi/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/decoder_midi/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/decoder_vp9/build.gradle b/libraries/decoder_vp9/build.gradle
index 9c03863a869..4412635c764 100644
--- a/libraries/decoder_vp9/build.gradle
+++ b/libraries/decoder_vp9/build.gradle
@@ -17,6 +17,12 @@ apply from: "$gradle.ext.androidxMediaSettingsDir/common_config.gradle"
android {
namespace 'androidx.media3.decoder.vp9'
+ publishing {
+ singleVariant('release') {
+ withSourcesJar()
+ }
+ }
+
sourceSets {
main {
jniLibs.srcDir 'src/main/libs'
@@ -26,6 +32,12 @@ android {
}
}
+ext {
+ releaseArtifactId = 'media3-decoder-vp9'
+ releaseName = 'Media3 VP9 decoder module'
+}
+apply from: '../../publish.gradle'
+
dependencies {
api project(modulePrefix + 'lib-decoder')
// TODO(b/203752526): Remove this dependency.
diff --git a/libraries/decoder_vp9/src/main/jni/libvpx.mk b/libraries/decoder_vp9/src/main/jni/libvpx.mk
index f34cb033c67..cd4d6c7ca21 100644
--- a/libraries/decoder_vp9/src/main/jni/libvpx.mk
+++ b/libraries/decoder_vp9/src/main/jni/libvpx.mk
@@ -80,4 +80,6 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/libvpx \
$(LOCAL_PATH)/libvpx/vpx
LOCAL_LDFLAGS := -Wl,--version-script=$(CONFIG_DIR)/libvpx.ver
+# Enable 16 KB ELF alignment.
+LOCAL_LDFLAGS += -Wl,-z,max-page-size=16384
include $(BUILD_SHARED_LIBRARY)
diff --git a/libraries/decoder_vp9/src/main/libs/arm64-v8a/libvpx.so b/libraries/decoder_vp9/src/main/libs/arm64-v8a/libvpx.so
new file mode 100755
index 00000000000..d5c634cd21e
Binary files /dev/null and b/libraries/decoder_vp9/src/main/libs/arm64-v8a/libvpx.so differ
diff --git a/libraries/decoder_vp9/src/main/libs/arm64-v8a/libvpxV2JNI.so b/libraries/decoder_vp9/src/main/libs/arm64-v8a/libvpxV2JNI.so
new file mode 100755
index 00000000000..5d2050015f4
Binary files /dev/null and b/libraries/decoder_vp9/src/main/libs/arm64-v8a/libvpxV2JNI.so differ
diff --git a/libraries/decoder_vp9/src/main/libs/armeabi-v7a/libvpx.so b/libraries/decoder_vp9/src/main/libs/armeabi-v7a/libvpx.so
new file mode 100755
index 00000000000..5f16bee7d33
Binary files /dev/null and b/libraries/decoder_vp9/src/main/libs/armeabi-v7a/libvpx.so differ
diff --git a/libraries/decoder_vp9/src/main/libs/armeabi-v7a/libvpxV2JNI.so b/libraries/decoder_vp9/src/main/libs/armeabi-v7a/libvpxV2JNI.so
new file mode 100755
index 00000000000..818cf906625
Binary files /dev/null and b/libraries/decoder_vp9/src/main/libs/armeabi-v7a/libvpxV2JNI.so differ
diff --git a/libraries/decoder_vp9/src/main/libs/x86/libvpx.so b/libraries/decoder_vp9/src/main/libs/x86/libvpx.so
new file mode 100755
index 00000000000..67952f4766f
Binary files /dev/null and b/libraries/decoder_vp9/src/main/libs/x86/libvpx.so differ
diff --git a/libraries/decoder_vp9/src/main/libs/x86/libvpxV2JNI.so b/libraries/decoder_vp9/src/main/libs/x86/libvpxV2JNI.so
new file mode 100755
index 00000000000..df349691438
Binary files /dev/null and b/libraries/decoder_vp9/src/main/libs/x86/libvpxV2JNI.so differ
diff --git a/libraries/decoder_vp9/src/main/libs/x86_64/libvpx.so b/libraries/decoder_vp9/src/main/libs/x86_64/libvpx.so
new file mode 100755
index 00000000000..73e8566b913
Binary files /dev/null and b/libraries/decoder_vp9/src/main/libs/x86_64/libvpx.so differ
diff --git a/libraries/decoder_vp9/src/main/libs/x86_64/libvpxV2JNI.so b/libraries/decoder_vp9/src/main/libs/x86_64/libvpxV2JNI.so
new file mode 100755
index 00000000000..133c241dbb6
Binary files /dev/null and b/libraries/decoder_vp9/src/main/libs/x86_64/libvpxV2JNI.so differ
diff --git a/libraries/effect/proguard-rules.txt b/libraries/effect/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/effect/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/drm/FrameworkMediaDrm.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/drm/FrameworkMediaDrm.java
index a91959f7f73..b0401c66399 100644
--- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/drm/FrameworkMediaDrm.java
+++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/drm/FrameworkMediaDrm.java
@@ -512,10 +512,14 @@ private static boolean cdmRequiresCommonPsshUuid(UUID uuid) {
return SDK_INT < 27 && Objects.equals(uuid, C.CLEARKEY_UUID);
}
- private static void forceWidevineL3(MediaDrm mediaDrm) {
+ public static void forceWidevineL3(MediaDrm mediaDrm) {
mediaDrm.setPropertyString("securityLevel", "L3");
}
+ public void forceWidevineL3() {
+ forceWidevineL3(mediaDrm);
+ }
+
/**
* Returns whether the device codec is known to fail if security level L1 is used.
*
diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/offline/SegmentDownloader.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/offline/SegmentDownloader.java
index fedfdd80dd8..b3c5f9427c1 100644
--- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/offline/SegmentDownloader.java
+++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/offline/SegmentDownloader.java
@@ -111,8 +111,8 @@ protected static class Segment implements Comparable {
/** The start time of the segment in microseconds. */
public final long startTimeUs;
- /** The {@link DataSpec} of the segment. */
- public final DataSpec dataSpec;
+ /** The {@link DataSpec} of the segment: Mutable for convenience */
+ public DataSpec dataSpec;
/** Constructs a Segment. */
public Segment(long startTimeUs, DataSpec dataSpec) {
@@ -238,6 +238,11 @@ public final void download(@Nullable ProgressListener progressListener)
long bytesDownloaded = 0;
for (int i = segments.size() - 1; i >= 0; i--) {
DataSpec dataSpec = segments.get(i).dataSpec;
+
+ // Persist the manifest URI in the DataSpec so that it can be used at a later point if needed.
+ dataSpec = dataSpec.buildUpon().setCustomData(manifestDataSpec.uri).build();
+ segments.get(i).dataSpec = dataSpec;
+
String cacheKey = cacheKeyFactory.buildCacheKey(dataSpec);
long segmentLength = dataSpec.length;
if (segmentLength == C.LENGTH_UNSET) {
@@ -396,13 +401,19 @@ protected final M getManifest(DataSource dataSource, DataSpec dataSpec, boolean
throws InterruptedException, IOException {
return execute(
() ->
- new RunnableFutureTask() {
- @Override
- protected M doWork() throws IOException {
- return ParsingLoadable.load(
- dataSource, manifestParser, dataSpec, C.DATA_TYPE_MANIFEST);
+ new RunnableFutureTask() {
+ @Override
+ protected M doWork() throws IOException {
+ DataSpec customDataSpec = dataSpec;
+ // Create a new DataSpec for each media playlist to ensure that the base URI is set,
+ // for convenience to extract later, when working with base manifest, for stream keys or so...
+ if (customDataSpec.customData == null) {
+ customDataSpec = dataSpec.buildUpon().setCustomData(manifestDataSpec.uri).build();
}
- },
+
+ return ParsingLoadable.load(dataSource, manifestParser, customDataSpec, C.DATA_TYPE_MANIFEST);
+ }
+ },
removing);
}
diff --git a/libraries/exoplayer_dash/proguard-rules.txt b/libraries/exoplayer_dash/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/exoplayer_dash/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/exoplayer_hls/proguard-rules.txt b/libraries/exoplayer_hls/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/exoplayer_hls/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/exoplayer_hls/src/main/java/androidx/media3/exoplayer/hls/playlist/DefaultHlsPlaylistTracker.java b/libraries/exoplayer_hls/src/main/java/androidx/media3/exoplayer/hls/playlist/DefaultHlsPlaylistTracker.java
index cca1e9401bf..7fc37515635 100644
--- a/libraries/exoplayer_hls/src/main/java/androidx/media3/exoplayer/hls/playlist/DefaultHlsPlaylistTracker.java
+++ b/libraries/exoplayer_hls/src/main/java/androidx/media3/exoplayer/hls/playlist/DefaultHlsPlaylistTracker.java
@@ -403,6 +403,32 @@ public void onLoadCompleted(
redundantGroupListCreationError = e;
return;
}
+ if (variantRedundantGroups.isEmpty()) {
+ // Audio-only HLS: no video variants. Promote first audio rendition as synthetic variant.
+ Uri audioUrl = null;
+ for (HlsMultivariantPlaylist.Rendition audio : multivariantPlaylist.audios) {
+ if (audio.url != null) {
+ audioUrl = audio.url;
+ break;
+ }
+ }
+ if (audioUrl == null) {
+ redundantGroupListCreationError =
+ ParserException.createForMalformedManifest(
+ "No variants or audio renditions with URLs found.", /* cause= */ null);
+ return;
+ }
+ multivariantPlaylist =
+ HlsMultivariantPlaylist.createSingleVariantMultivariantPlaylist(audioUrl.toString());
+ this.multivariantPlaylist = multivariantPlaylist;
+ try {
+ this.variantRedundantGroups =
+ HlsRedundantGroup.createVariantRedundantGroupList(multivariantPlaylist.variants);
+ } catch (ParserException e) {
+ redundantGroupListCreationError = e;
+ return;
+ }
+ }
HlsRedundantGroup primaryRedundantGroup = variantRedundantGroups.get(0);
primaryMediaPlaylistUrl = primaryRedundantGroup.getCurrentPlaylistUrl();
// Add a temporary playlist listener for loading the first primary playlist.
diff --git a/libraries/exoplayer_ima/proguard-rules.txt b/libraries/exoplayer_ima/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/exoplayer_ima/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/exoplayer_rtsp/proguard-rules.txt b/libraries/exoplayer_rtsp/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/exoplayer_rtsp/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/exoplayer_smoothstreaming/proguard-rules.txt b/libraries/exoplayer_smoothstreaming/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/exoplayer_smoothstreaming/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/exoplayer_workmanager/proguard-rules.txt b/libraries/exoplayer_workmanager/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/exoplayer_workmanager/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/inspector/proguard-rules.txt b/libraries/inspector/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/inspector/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/muxer/proguard-rules.txt b/libraries/muxer/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/muxer/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/session/proguard-rules.txt b/libraries/session/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/session/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/test_data/proguard-rules.txt b/libraries/test_data/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/test_data/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/test_exoplayer_playback/proguard-rules.txt b/libraries/test_exoplayer_playback/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/test_exoplayer_playback/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/test_session_common/proguard-rules.txt b/libraries/test_session_common/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/test_session_common/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/test_session_current/proguard-rules.txt b/libraries/test_session_current/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/test_session_current/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/test_utils/proguard-rules.txt b/libraries/test_utils/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/test_utils/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/test_utils_robolectric/proguard-rules.txt b/libraries/test_utils_robolectric/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/test_utils_robolectric/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/transformer/proguard-rules.txt b/libraries/transformer/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/transformer/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/ui_compose/build.gradle b/libraries/ui_compose/build.gradle
index 5ca5217b749..f99c7bef873 100644
--- a/libraries/ui_compose/build.gradle
+++ b/libraries/ui_compose/build.gradle
@@ -42,7 +42,7 @@ android {
}
kotlin {
compilerOptions {
- jvmTarget.set(JvmTarget.JVM_1_8)
+ jvmTarget.set(JvmTarget.JVM_21)
}
}
}
diff --git a/libraries/ui_compose/proguard-rules.txt b/libraries/ui_compose/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/ui_compose/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/ui_compose/src/main/java/androidx/media3/ui/compose/PlayerSurface.kt b/libraries/ui_compose/src/main/java/androidx/media3/ui/compose/PlayerSurface.kt
index 40fdc10f59f..a737e166660 100644
--- a/libraries/ui_compose/src/main/java/androidx/media3/ui/compose/PlayerSurface.kt
+++ b/libraries/ui_compose/src/main/java/androidx/media3/ui/compose/PlayerSurface.kt
@@ -121,7 +121,7 @@ fun PlayerSurface(
}
@Composable
-private fun PlayerSurfaceInternal(
+fun PlayerSurfaceInternal(
player: Player?,
modifier: Modifier,
createView: (Context) -> T,
diff --git a/libraries/ui_compose_material3/proguard-rules.txt b/libraries/ui_compose_material3/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/ui_compose_material3/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules
diff --git a/libraries/ui_leanback/proguard-rules.txt b/libraries/ui_leanback/proguard-rules.txt
new file mode 100644
index 00000000000..975f9dce3eb
--- /dev/null
+++ b/libraries/ui_leanback/proguard-rules.txt
@@ -0,0 +1 @@
+# Consumer proguard rules