-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sourceSets to support breaking ima change
- Loading branch information
1 parent
4161496
commit 17bd877
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
* See the sourceSet defs for more details | ||
*/ | ||
|
||
object VersionCompat { | ||
@androidx.annotation.OptIn(UnstableApi::class) | ||
fun adsLoaderStateFromBundle(bundle: Bundle): ImaServerSideAdInsertionMediaSource.AdsLoader.State { | ||
return ImaServerSideAdInsertionMediaSource.AdsLoader.State.fromBundle(bundle) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters