: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>
48 lines
1.3 KiB
Kotlin
48 lines
1.3 KiB
Kotlin
plugins {
|
|
id("com.android.library")
|
|
kotlin("android")
|
|
}
|
|
|
|
// Sealed Shade media (SMF1) in Media3/ExoPlayer.
|
|
//
|
|
// `:shade-android` reads and verifies sealed files on the JVM; this module
|
|
// hands that reader to ExoPlayer as a DataSource, so any container the
|
|
// player understands (MP4, WebM, MKV, MP3, …) plays and seeks from a sealed
|
|
// file without the plaintext ever touching disk or the network.
|
|
|
|
android {
|
|
namespace = "no.zyon.shade.media.android"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
minSdk = 24
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
|
|
testOptions {
|
|
unitTests.isIncludeAndroidResources = true
|
|
}
|
|
}
|
|
|
|
val media3 = "1.5.1"
|
|
|
|
dependencies {
|
|
api(project(":shade-android"))
|
|
api("androidx.media3:media3-exoplayer:$media3")
|
|
api("androidx.media3:media3-datasource:$media3")
|
|
|
|
testImplementation("junit:junit:4.13.2")
|
|
testImplementation("org.robolectric:robolectric:4.14.1")
|
|
testImplementation("androidx.test:core:1.6.1")
|
|
testImplementation("androidx.media3:media3-test-utils:$media3")
|
|
testImplementation("androidx.media3:media3-test-utils-robolectric:$media3")
|
|
}
|