feat(media,android): ExoPlayer DataSource for sealed files, demo player app
:shade-android-media wraps the Kotlin MediaReader as a Media3 DataSource, so ExoPlayer plays and seeks any container from a sealed file; a tampered segment fails the read instead of reaching the decoder. :shade-media-demo opens a shared watch link and plays it. Verified: Robolectric — byte-exact reads whole and in ranges, tamper refusal, ExoPlayer plays a sealed H.264/AAC clip to the end and reopens mid-file on seek. Kotlin suite 80/0. Not yet run on a device. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
45
android/shade-media-demo/build.gradle.kts
Normal file
45
android/shade-media-demo/build.gradle.kts
Normal file
@@ -0,0 +1,45 @@
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
kotlin("android")
|
||||
}
|
||||
|
||||
// Demo player for sealed Shade media: open a `…/watch/#shade=…` link and
|
||||
// play it with ExoPlayer through `ShadeMediaDataSource`. Debug-signed, for
|
||||
// the dev phone; not a product.
|
||||
|
||||
android {
|
||||
namespace = "no.zyon.shade.mediademo"
|
||||
compileSdk = 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "no.zyon.shade.mediademo"
|
||||
minSdk = 24
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
versionName = "4.15.0"
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
}
|
||||
}
|
||||
|
||||
packaging {
|
||||
resources.excludes += setOf("META-INF/versions/9/OSGI-INF/MANIFEST.MF")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":shade-android-media"))
|
||||
implementation("androidx.media3:media3-ui:1.5.1")
|
||||
}
|
||||
Reference in New Issue
Block a user