diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a91ae0..e1a3293 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ > - 🏠 Internal > - 💅 Polish +## v1.13.2 (2026-03-03) + +* 🐛 Fixed `PictureInPictureButton` to only be shown when the backing `THEOplayerView` has a valid `PiPConfiguration`. ([#81](https://github.com/THEOplayer/android-ui/pull/81)) + ## v1.13.1 (2026-01-05) * 🐛 Changed THEOplayer to be an `api` dependency in Gradle. ([#76](https://github.com/THEOplayer/android-ui/pull/76)) diff --git a/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt b/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt index ed29d6b..14e3ad5 100644 --- a/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt +++ b/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt @@ -75,7 +75,7 @@ fun MainContent() { val context = LocalContext.current val theoplayerView = remember(context) { val config = THEOplayerConfig.Builder().apply { - pipConfiguration(PipConfiguration.Builder().build()) + pip(PipConfiguration.Builder().build()) }.build() THEOplayerView(context, config).apply { // Add ads integration through Google IMA diff --git a/gradle.properties b/gradle.properties index 7ce742d..c396b12 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,4 +27,4 @@ org.gradle.configuration-cache=true org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true # The version of the THEOplayer Open Video UI for Android. -version=1.13.1 +version=1.13.2 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 70571fa..0b273d0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,7 +16,7 @@ androidx-junit = "1.3.0" androidx-espresso = "3.7.0" androidx-mediarouter = "1.8.1" dokka = "2.0.0" -theoplayer = { prefer="10.0.0", strictly = "[5.0, 11.0)" } +theoplayer = { prefer="10.11.0", strictly = "[5.0, 11.0)" } [libraries] androidx-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "ktx" } diff --git a/scripts/github_changelog.js b/scripts/github_changelog.js index fb2b2e5..e94dbb7 100755 --- a/scripts/github_changelog.js +++ b/scripts/github_changelog.js @@ -11,13 +11,12 @@ if (!version) { const changelogPath = path.resolve(__dirname, "../CHANGELOG.md"); const changelog = fs.readFileSync(changelogPath, "utf-8"); const headingStart = "## "; -// Find block with current version const block = changelog .split(headingStart) .find((block) => block.startsWith(`v${version}`)) .trim(); let lines = block.split("\n"); -// Remove version +// Remove version heading lines.splice(0, 1); console.log(lines.join("\n").trim()); diff --git a/ui/src/main/java/com/theoplayer/android/ui/Player.kt b/ui/src/main/java/com/theoplayer/android/ui/Player.kt index ca4986d..d65f518 100644 --- a/ui/src/main/java/com/theoplayer/android/ui/Player.kt +++ b/ui/src/main/java/com/theoplayer/android/ui/Player.kt @@ -511,7 +511,9 @@ internal class PlayerImpl(override val theoplayerView: THEOplayerView?) : Player private set override val pictureInPictureSupported: Boolean by lazy { - (theoplayerView?.context as? Activity)?.supportsPictureInPictureMode() ?: false + val theoplayerView = theoplayerView ?: return@lazy false + val activity = theoplayerView.context as? Activity ?: return@lazy false + theoplayerView.piPManager != null && activity.supportsPictureInPictureMode() } override fun enterPictureInPicture(pipType: PiPType) {