Skip to content

Commit

Permalink
Releases/v1.5.2 (#98)
Browse files Browse the repository at this point in the history
## Fixes

* fix: use real media3 SDK version (#95)

## Improvements

* Add support for media3 v1.4 (#93) (#97)
* feat: Handle nonfatal codec exceptions on API 21+ (#96)

## Internal lib updates

* Update `android` lib 1.4.0
* Update `stats.java` lib to 8.1.0
* Remove `kt-utils` from the dependencies. It is no longer required



Co-authored-by: Emily Dixon <[email protected]>
Co-authored-by: GitHub <[email protected]>
  • Loading branch information
daytime-em and web-flow authored Sep 20, 2024
1 parent 5928c53 commit d4bb41b
Show file tree
Hide file tree
Showing 14 changed files with 273 additions and 313 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/android-cicd.yml

This file was deleted.

73 changes: 0 additions & 73 deletions .github/workflows/artifactory-deploy-from-tag.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/upload-dokka-docs.yml

This file was deleted.

74 changes: 62 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ plugins {

android {
namespace 'com.mux.stats.muxdatasdkformedia3'
compileSdk 34
compileSdk 35

defaultConfig {
applicationId "com.example.muxdatasdkformedia3"
targetSdk 34
//noinspection OldTargetApi
targetSdk 35
minSdk 21
versionCode 1
versionName "1.0"
Expand All @@ -23,12 +24,32 @@ android {
flavorDimensions = ["media3"]
productFlavors {
At_latest { dimension "media3" }
// This module does not currently need different src sets for different media3 versions.
// We still need to declare different flavors so we can create version-specific variants
at_1_0 { dimension "media3" }
at_1_1 { dimension "media3" }
at_1_2 { dimension "media3" }
at_1_3 { dimension "media3" }
at_1_4 { dimension "media3" }
}

sourceSets {
At_latest {
java.srcDirs += "src/compatFrom1_3/java"
}
at_1_0 {
java.srcDirs += "src/compatFrom1_0/java"
}
at_1_1 {
java.srcDirs += "src/compatFrom1_0/java"
}
at_1_2 {
java.srcDirs += "src/compatFrom1_0/java"
}
at_1_3 {
java.srcDirs += "src/compatFrom1_3/java"
}
at_1_4 {
java.srcDirs += "src/compatFrom1_3/java"
}
}

buildTypes {
Expand Down Expand Up @@ -87,37 +108,66 @@ dependencies {
//noinspection GradleDependency
at_1_0Implementation "androidx.media3:media3-exoplayer-rtsp:1.0.0"

//noinspection GradleDependency
at_1_1Implementation "androidx.media3:media3-exoplayer:1.1.1"
//noinspection GradleDependency
at_1_1Implementation "androidx.media3:media3-session:1.1.1"
//noinspection GradleDependency
at_1_1Implementation "androidx.media3:media3-ui:1.1.1"
//noinspection GradleDependency
at_1_1Implementation "androidx.media3:media3-exoplayer-ima:1.1.1"
//noinspection GradleDependency
at_1_1Implementation "androidx.media3:media3-exoplayer-dash:1.1.1"
//noinspection GradleDependency
at_1_1Implementation "androidx.media3:media3-exoplayer-hls:1.1.1"
//noinspection GradleDependency
at_1_1Implementation "androidx.media3:media3-exoplayer-rtsp:1.1.1"

//noinspection GradleDependency
at_1_2Implementation "androidx.media3:media3-exoplayer:1.2.0"
//noinspection GradleDependency
at_1_2Implementation "androidx.media3:media3-session:1.2.0"
//noinspection GradleDependency
at_1_2Implementation "androidx.media3:media3-ui:1.2.0"
//noinspection GradleDependency
at_1_2Implementation "androidx.media3:media3-exoplayer-ima:1.2.0"
//noinspection GradleDependency
at_1_2Implementation "androidx.media3:media3-exoplayer-dash:1.2.0"
//noinspection GradleDependency
at_1_2Implementation "androidx.media3:media3-exoplayer-hls:1.2.0"
//noinspection GradleDependency
at_1_2Implementation "androidx.media3:media3-exoplayer-rtsp:1.2.0"


//noinspection GradleDependency
at_1_3Implementation "androidx.media3:media3-exoplayer:1.3.0"
//noinspection GradleDependency
at_1_3Implementation "androidx.media3:media3-session:1.3.0"
//noinspection GradleDependency
at_1_3Implementation "androidx.media3:media3-ui:1.3.0"
//noinspection GradleDependency
at_1_3Implementation "androidx.media3:media3-exoplayer-ima:1.3.0"
//noinspection GradleDependency
at_1_3Implementation "androidx.media3:media3-exoplayer-dash:1.3.0"
//noinspection GradleDependency
at_1_3Implementation "androidx.media3:media3-exoplayer-hls:1.3.0"
//noinspection GradleDependency
at_1_3Implementation "androidx.media3:media3-exoplayer-rtsp:1.3.0"

At_latestImplementation "androidx.media3:media3-exoplayer:1.3.1"
At_latestImplementation "androidx.media3:media3-session:1.3.1"
At_latestImplementation "androidx.media3:media3-ui:1.3.1"
At_latestImplementation "androidx.media3:media3-exoplayer-ima:1.3.1"
At_latestImplementation "androidx.media3:media3-exoplayer-dash:1.3.1"
At_latestImplementation "androidx.media3:media3-exoplayer-hls:1.3.1"
At_latestImplementation "androidx.media3:media3-exoplayer-rtsp:1.3.1"
at_1_4Implementation "androidx.media3:media3-exoplayer:1.4.1"
at_1_4Implementation "androidx.media3:media3-session:1.4.1"
at_1_4Implementation "androidx.media3:media3-ui:1.4.1"
at_1_4Implementation "androidx.media3:media3-exoplayer-ima:1.4.1"
at_1_4Implementation "androidx.media3:media3-exoplayer-dash:1.4.1"
at_1_4Implementation "androidx.media3:media3-exoplayer-hls:1.4.1"
at_1_4Implementation "androidx.media3:media3-exoplayer-rtsp:1.4.1"

At_latestImplementation "androidx.media3:media3-exoplayer:1.4.1"
At_latestImplementation "androidx.media3:media3-session:1.4.1"
At_latestImplementation "androidx.media3:media3-ui:1.4.1"
At_latestImplementation "androidx.media3:media3-exoplayer-ima:1.4.1"
At_latestImplementation "androidx.media3:media3-exoplayer-dash:1.4.1"
At_latestImplementation "androidx.media3:media3-exoplayer-hls:1.4.1"
At_latestImplementation "androidx.media3:media3-exoplayer-rtsp:1.4.1"

implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
Expand Down
16 changes: 16 additions & 0 deletions app/src/compatFrom1_0/java/VersionCompat.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import android.os.Bundle
import androidx.media3.common.util.UnstableApi
import androidx.media3.exoplayer.ima.ImaServerSideAdInsertionMediaSource

/*
* VersionCompat.kt: Functions with different Variants for different media3
* versions. There are other version of this file for other variants. Look
* in the source set defs for more details
*/

object VersionCompat {
@androidx.annotation.OptIn(UnstableApi::class)
fun adsLoaderStateFromBundle(bundle: Bundle): ImaServerSideAdInsertionMediaSource.AdsLoader.State {
return ImaServerSideAdInsertionMediaSource.AdsLoader.State.CREATOR.fromBundle(bundle)
}
}
17 changes: 17 additions & 0 deletions app/src/compatFrom1_3/java/VersionCompat.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import android.os.Bundle
import androidx.media3.common.util.UnstableApi
import androidx.media3.exoplayer.ima.ImaServerSideAdInsertionMediaSource

/**
* Functions with different Variants for different media3 versions. There are other version of this
* file for other variants. See the sourceSet defs for more details
*
* Customers probably don't need a class like this. We have one because we support older versions of
* media3, so we need variants
*/
object VersionCompat {
@androidx.annotation.OptIn(UnstableApi::class)
fun adsLoaderStateFromBundle(bundle: Bundle): ImaServerSideAdInsertionMediaSource.AdsLoader.State {
return ImaServerSideAdInsertionMediaSource.AdsLoader.State.fromBundle(bundle)
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.mux.stats.muxdatasdkformedia3.examples.ima

import VersionCompat
import android.net.Uri
import android.os.Bundle
import android.os.PersistableBundle
Expand Down Expand Up @@ -60,7 +61,7 @@ class ImaServerAdsActivity : AppCompatActivity() {
window.addFlags(View.KEEP_SCREEN_ON)

adsLoaderState = savedInstanceState?.getBundle(EXTRA_ADS_LOADER_STATE)
?.let { AdsLoader.State.CREATOR.fromBundle(it) }
?.let { VersionCompat.adsLoaderStateFromBundle(it) }
}

override fun onResume() {
Expand Down
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import org.jetbrains.dokka.gradle.DokkaTaskPartial
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.4.2' apply false
id 'com.android.library' version '8.4.2' apply false
id 'com.android.application' version '8.5.2' apply false
id 'com.android.library' version '8.5.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.24' apply false
id 'com.mux.gradle.android.mux-android-distribution' version '1.1.2' apply false
id 'com.mux.gradle.android.mux-android-distribution' version '1.3.0' apply false
id "org.jetbrains.dokka" version "1.6.10"
}

allprojects {
project.ext {
coreVersion = '1.3.1'
coreVersion = '1.4.0'
}

tasks.withType(DokkaTaskPartial.class) {
Expand Down
Loading

0 comments on commit d4bb41b

Please sign in to comment.