mirror of
https://github.com/recloudstream/cloudstream.git
synced 2026-06-19 20:05:41 +00:00
Compare commits
1 commit
master
...
fixgradien
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14848c59cb |
13 changed files with 33 additions and 198 deletions
|
|
@ -207,6 +207,7 @@ dependencies {
|
||||||
testImplementation(libs.junit)
|
testImplementation(libs.junit)
|
||||||
testImplementation(libs.json)
|
testImplementation(libs.json)
|
||||||
androidTestImplementation(libs.core)
|
androidTestImplementation(libs.core)
|
||||||
|
androidTestImplementation(libs.classgraph)
|
||||||
androidTestImplementation(libs.espresso.core)
|
androidTestImplementation(libs.espresso.core)
|
||||||
androidTestImplementation(libs.ext.junit)
|
androidTestImplementation(libs.ext.junit)
|
||||||
androidTestImplementation(libs.instancio.core)
|
androidTestImplementation(libs.instancio.core)
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ class SerializationClassTester {
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEX files are the best solution to read all our classes dynamically.
|
// DEX files are the best solution to read all our classes dynamically.
|
||||||
// classgraph could be used instead, but it only gives results on the JVM, not Android.
|
// ClassGraph() can be used instead, but it only gives results on the JVM, not Android.
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
private fun findSerializableClasses(packageName: String): List<KClass<*>> {
|
private fun findSerializableClasses(packageName: String): List<KClass<*>> {
|
||||||
val context = InstrumentationRegistry
|
val context = InstrumentationRegistry
|
||||||
|
|
@ -109,6 +109,7 @@ class SerializationClassTester {
|
||||||
.targetContext
|
.targetContext
|
||||||
|
|
||||||
val dexFile = DexFile(context.packageCodePath)
|
val dexFile = DexFile(context.packageCodePath)
|
||||||
|
|
||||||
return dexFile.entries()
|
return dexFile.entries()
|
||||||
.toList()
|
.toList()
|
||||||
.filter { it.startsWith(packageName) }
|
.filter { it.startsWith(packageName) }
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,8 @@ import com.lagradost.cloudstream3.actions.temp.MpvExPackage
|
||||||
import com.lagradost.cloudstream3.actions.temp.MpvKtPackage
|
import com.lagradost.cloudstream3.actions.temp.MpvKtPackage
|
||||||
import com.lagradost.cloudstream3.actions.temp.MpvKtPreviewPackage
|
import com.lagradost.cloudstream3.actions.temp.MpvKtPreviewPackage
|
||||||
import com.lagradost.cloudstream3.actions.temp.MpvPackage
|
import com.lagradost.cloudstream3.actions.temp.MpvPackage
|
||||||
import com.lagradost.cloudstream3.actions.temp.MpvRxPackage
|
|
||||||
import com.lagradost.cloudstream3.actions.temp.MpvYTDLPackage
|
import com.lagradost.cloudstream3.actions.temp.MpvYTDLPackage
|
||||||
import com.lagradost.cloudstream3.actions.temp.NextPlayerPackage
|
import com.lagradost.cloudstream3.actions.temp.NextPlayerPackage
|
||||||
import com.lagradost.cloudstream3.actions.temp.OnlyPlayer
|
|
||||||
import com.lagradost.cloudstream3.actions.temp.PlayInBrowserAction
|
import com.lagradost.cloudstream3.actions.temp.PlayInBrowserAction
|
||||||
import com.lagradost.cloudstream3.actions.temp.PlayMirrorAction
|
import com.lagradost.cloudstream3.actions.temp.PlayMirrorAction
|
||||||
import com.lagradost.cloudstream3.actions.temp.ViewM3U8Action
|
import com.lagradost.cloudstream3.actions.temp.ViewM3U8Action
|
||||||
|
|
@ -66,8 +64,6 @@ object VideoClickActionHolder {
|
||||||
MpvYTDLPackage(),
|
MpvYTDLPackage(),
|
||||||
MpvKtPackage(),
|
MpvKtPackage(),
|
||||||
MpvKtPreviewPackage(),
|
MpvKtPreviewPackage(),
|
||||||
OnlyPlayer(),
|
|
||||||
MpvRxPackage(),
|
|
||||||
// Always Ask option
|
// Always Ask option
|
||||||
AlwaysAskAction(),
|
AlwaysAskAction(),
|
||||||
// added by plugins
|
// added by plugins
|
||||||
|
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
||||||
package com.lagradost.cloudstream3.actions.temp
|
|
||||||
|
|
||||||
import android.app.Activity
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import androidx.core.net.toUri
|
|
||||||
import com.lagradost.api.Log
|
|
||||||
import com.lagradost.cloudstream3.actions.OpenInAppAction
|
|
||||||
import com.lagradost.cloudstream3.actions.updateDurationAndPosition
|
|
||||||
import com.lagradost.cloudstream3.isEpisodeBased
|
|
||||||
import com.lagradost.cloudstream3.ui.result.LinkLoadingResult
|
|
||||||
import com.lagradost.cloudstream3.ui.result.ResultEpisode
|
|
||||||
import com.lagradost.cloudstream3.utils.DataStoreHelper.getViewPos
|
|
||||||
import com.lagradost.cloudstream3.utils.txt
|
|
||||||
|
|
||||||
/** https://github.com/Riteshp2001/mpvRx
|
|
||||||
*
|
|
||||||
* https://github.com/Riteshp2001/mpvRx/blob/00e0c5e803ab53e5757426cbf2248448ba1f49bf/app/src/main/java/app/gyrolet/mpvrx/utils/media/MediaUtils.kt#L132
|
|
||||||
* https://github.com/Riteshp2001/mpvRx/blob/00e0c5e803ab53e5757426cbf2248448ba1f49bf/app/src/main/java/app/gyrolet/mpvrx/utils/media/MediaUtils.kt#L56
|
|
||||||
* */
|
|
||||||
class MpvRxPackage : OpenInAppAction(
|
|
||||||
appName = txt("mpvRx"),
|
|
||||||
packageName = "app.gyrolet.mpvrx",
|
|
||||||
intentClass = "app.gyrolet.mpvrx.ui.player.PlayerActivity"
|
|
||||||
) {
|
|
||||||
override val oneSource = true
|
|
||||||
override suspend fun putExtra(
|
|
||||||
context: Context,
|
|
||||||
intent: Intent,
|
|
||||||
video: ResultEpisode,
|
|
||||||
result: LinkLoadingResult,
|
|
||||||
index: Int?
|
|
||||||
) {
|
|
||||||
intent.apply {
|
|
||||||
putExtra("title", video.name)
|
|
||||||
val link = result.links[index!!]
|
|
||||||
val headers = link.headers
|
|
||||||
|
|
||||||
setData(link.url.toUri())
|
|
||||||
if (headers.isNotEmpty()) {
|
|
||||||
// PlayerActivity expects a flat array: [key1, value1, key2, value2, ...]
|
|
||||||
val flat = headers.entries.flatMap { listOf(it.key, it.value) }.toTypedArray()
|
|
||||||
intent.putExtra("headers", flat)
|
|
||||||
}
|
|
||||||
/*val subs = result.subs // disabled due to https://github.com/Riteshp2001/mpvRx/issues/146
|
|
||||||
intent.putExtra("subs", subs.map { it.url.toUri() }.toTypedArray())
|
|
||||||
intent.putExtra(
|
|
||||||
"subs.titles",
|
|
||||||
subs.map { it.name }.toTypedArray(),
|
|
||||||
)
|
|
||||||
intent.putExtra(
|
|
||||||
"subs.langs",
|
|
||||||
subs.map { it.languageCode }.toTypedArray(),
|
|
||||||
)
|
|
||||||
val selected = subs.firstOrNull { it.matchesLanguageCode("en") }?.url?.toUri()
|
|
||||||
intent.putExtra("subs.enable", selected?.let { arrayOf(it) } ?: arrayOf<Uri>() )*/
|
|
||||||
|
|
||||||
if (video.tvType.isEpisodeBased()) {
|
|
||||||
video.season?.let { intent.putExtra("introdb_season", it) }
|
|
||||||
video.episode.let { intent.putExtra("introdb_episode", it) }
|
|
||||||
}
|
|
||||||
|
|
||||||
val position = getViewPos(video.id)?.position
|
|
||||||
if (position != null)
|
|
||||||
putExtra("position", position.toInt())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResult(activity: Activity, intent: Intent?) {
|
|
||||||
val position = intent?.getIntExtra("position", -1) ?: -1
|
|
||||||
val duration = intent?.getIntExtra("duration", -1) ?: -1
|
|
||||||
Log.d("MPV", "Position: $position, Duration: $duration")
|
|
||||||
updateDurationAndPosition(position.toLong(), duration.toLong())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
package com.lagradost.cloudstream3.actions.temp
|
|
||||||
|
|
||||||
import android.app.Activity
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Bundle
|
|
||||||
import androidx.core.net.toUri
|
|
||||||
import com.lagradost.cloudstream3.actions.OpenInAppAction
|
|
||||||
import com.lagradost.cloudstream3.ui.result.LinkLoadingResult
|
|
||||||
import com.lagradost.cloudstream3.ui.result.ResultEpisode
|
|
||||||
import com.lagradost.cloudstream3.utils.txt
|
|
||||||
|
|
||||||
/** https://github.com/Kindness-Kismet/only_player/tree/main
|
|
||||||
* https://github.com/Kindness-Kismet/only_player/blob/main/feature/player/src/main/java/one/only/player/feature/player/PlayerActivity.kt */
|
|
||||||
class OnlyPlayer : OpenInAppAction(
|
|
||||||
txt("Only Player"),
|
|
||||||
"one.only.player",
|
|
||||||
intentClass = "one.only.player.feature.player.PlayerActivity"
|
|
||||||
) {
|
|
||||||
override val oneSource = true
|
|
||||||
override suspend fun putExtra(
|
|
||||||
context: Context,
|
|
||||||
intent: Intent,
|
|
||||||
video: ResultEpisode,
|
|
||||||
result: LinkLoadingResult,
|
|
||||||
index: Int?
|
|
||||||
) {
|
|
||||||
/** https://github.com/Kindness-Kismet/only_player/blob/d3f55049a2913fa762d31b311146073cc2da46cb/app/src/main/java/one/only/player/navigation/CloudNavGraph.kt#L39 */
|
|
||||||
intent.apply {
|
|
||||||
val link = result.links[index!!]
|
|
||||||
setData(link.url.toUri())
|
|
||||||
|
|
||||||
putExtra("headers", Bundle().apply {
|
|
||||||
for ((key, value) in link.headers) {
|
|
||||||
putExtra(key, value)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResult(activity: Activity, intent: Intent?) {
|
|
||||||
/* onResult does not get called */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -50,8 +50,7 @@ class AniListApi : SyncAPI() {
|
||||||
override suspend fun login(redirectUrl: String, payload: String?): AuthToken? {
|
override suspend fun login(redirectUrl: String, payload: String?): AuthToken? {
|
||||||
val sanitizer = splitRedirectUrl(redirectUrl)
|
val sanitizer = splitRedirectUrl(redirectUrl)
|
||||||
val token = AuthToken(
|
val token = AuthToken(
|
||||||
accessToken = sanitizer["access_token"]
|
accessToken = sanitizer["access_token"] ?: throw ErrorLoadingException("No access token"),
|
||||||
?: throw ErrorLoadingException("No access token"),
|
|
||||||
//refreshToken = sanitizer["refresh_token"],
|
//refreshToken = sanitizer["refresh_token"],
|
||||||
accessTokenLifetime = unixTime + sanitizer["expires_in"]!!.toLong(),
|
accessTokenLifetime = unixTime + sanitizer["expires_in"]!!.toLong(),
|
||||||
)
|
)
|
||||||
|
|
@ -85,7 +84,7 @@ class AniListApi : SyncAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun search(auth : AuthData?, query: String): List<SyncAPI.SyncSearchResult>? {
|
override suspend fun search(auth : AuthData?, query: String): List<SyncAPI.SyncSearchResult>? {
|
||||||
val data = searchShows(query) ?: return null
|
val data = searchShows(name) ?: return null
|
||||||
return data.data?.page?.media?.map {
|
return data.data?.page?.media?.map {
|
||||||
SyncAPI.SyncSearchResult(
|
SyncAPI.SyncSearchResult(
|
||||||
it.title.romaji ?: return null,
|
it.title.romaji ?: return null,
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ class MALApi : SyncAPI() {
|
||||||
|
|
||||||
override suspend fun search(auth : AuthData?, query: String): List<SyncAPI.SyncSearchResult>? {
|
override suspend fun search(auth : AuthData?, query: String): List<SyncAPI.SyncSearchResult>? {
|
||||||
val auth = auth?.token?.accessToken ?: return null
|
val auth = auth?.token?.accessToken ?: return null
|
||||||
val url = "$apiUrl/v2/anime?q=$query&limit=$MAL_MAX_SEARCH_LIMIT"
|
val url = "$apiUrl/v2/anime?q=$name&limit=$MAL_MAX_SEARCH_LIMIT"
|
||||||
val res = app.get(
|
val res = app.get(
|
||||||
url, headers = mapOf(
|
url, headers = mapOf(
|
||||||
"Authorization" to "Bearer $auth",
|
"Authorization" to "Bearer $auth",
|
||||||
|
|
|
||||||
|
|
@ -911,7 +911,7 @@ class SimklApi : SyncAPI() {
|
||||||
|
|
||||||
override suspend fun search(auth: AuthData?, query: String): List<SyncAPI.SyncSearchResult>? {
|
override suspend fun search(auth: AuthData?, query: String): List<SyncAPI.SyncSearchResult>? {
|
||||||
return app.get(
|
return app.get(
|
||||||
"$mainUrl/search/", params = mapOf("client_id" to CLIENT_ID, "q" to query)
|
"$mainUrl/search/", params = mapOf("client_id" to CLIENT_ID, "q" to name)
|
||||||
).parsedSafe<Array<MediaObject>>()?.mapNotNull { it.toSyncSearchResult() }
|
).parsedSafe<Array<MediaObject>>()?.mapNotNull { it.toSyncSearchResult() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ annotation = "1.10.0"
|
||||||
appcompat = "1.7.1"
|
appcompat = "1.7.1"
|
||||||
biometric = "1.4.0-alpha07"
|
biometric = "1.4.0-alpha07"
|
||||||
buildkonfigGradlePlugin = "0.21.2"
|
buildkonfigGradlePlugin = "0.21.2"
|
||||||
|
classgraph = "4.8.184"
|
||||||
coil = { strictly = "3.3.0" } # Later versions require jvmTarget 11 or later
|
coil = { strictly = "3.3.0" } # Later versions require jvmTarget 11 or later
|
||||||
colorpicker = "6b46b49"
|
colorpicker = "6b46b49"
|
||||||
conscryptAndroid = { strictly = "2.5.2" } # 2.5.3 crashes everything
|
conscryptAndroid = { strictly = "2.5.2" } # 2.5.3 crashes everything
|
||||||
|
|
@ -69,6 +70,7 @@ anime-db = { module = "com.github.recloudstream:anime-db", version.ref = "animeD
|
||||||
annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" }
|
annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" }
|
||||||
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
|
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
|
||||||
biometric = { module = "androidx.biometric:biometric", version.ref = "biometric" }
|
biometric = { module = "androidx.biometric:biometric", version.ref = "biometric" }
|
||||||
|
classgraph = { group = "io.github.classgraph", name = "classgraph", version.ref = "classgraph" }
|
||||||
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
|
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
|
||||||
coil-network-okhttp = { module = "io.coil-kt.coil3:coil-network-okhttp", version.ref = "coil" }
|
coil-network-okhttp = { module = "io.coil-kt.coil3:coil-network-okhttp", version.ref = "coil" }
|
||||||
colorpicker = { module = "com.github.recloudstream:color-picker-android", version.ref = "colorpicker" }
|
colorpicker = { module = "com.github.recloudstream:color-picker-android", version.ref = "colorpicker" }
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ import kotlinx.datetime.format.parse
|
||||||
import kotlinx.datetime.toInstant
|
import kotlinx.datetime.toInstant
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlin.io.encoding.Base64
|
import kotlin.io.encoding.Base64
|
||||||
|
import kotlin.io.encoding.ExperimentalEncodingApi
|
||||||
import kotlin.math.absoluteValue
|
import kotlin.math.absoluteValue
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
import kotlin.time.Clock
|
import kotlin.time.Clock
|
||||||
|
|
@ -715,10 +716,12 @@ fun base64Decode(string: String): String {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OptIn(ExperimentalEncodingApi::class)
|
||||||
fun base64DecodeArray(string: String): ByteArray {
|
fun base64DecodeArray(string: String): ByteArray {
|
||||||
return Base64.decode(string)
|
return Base64.decode(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OptIn(ExperimentalEncodingApi::class)
|
||||||
fun base64Encode(array: ByteArray): String {
|
fun base64Encode(array: ByteArray): String {
|
||||||
return Base64.encode(array)
|
return Base64.encode(array)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
package com.lagradost.cloudstream3.extractors
|
|
||||||
|
|
||||||
import com.lagradost.cloudstream3.Prerelease
|
|
||||||
import com.lagradost.cloudstream3.SubtitleFile
|
|
||||||
import com.lagradost.cloudstream3.app
|
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
|
||||||
import com.lagradost.cloudstream3.utils.newExtractorLink
|
|
||||||
import kotlinx.serialization.SerialName
|
|
||||||
import kotlinx.serialization.Serializable
|
|
||||||
|
|
||||||
@Prerelease
|
|
||||||
open class Flyfile : ExtractorApi() {
|
|
||||||
override val name: String = "FlyFile"
|
|
||||||
override val mainUrl: String = "https://flyfile.app"
|
|
||||||
open val apiUrl: String = "https://api.flyfile.app"
|
|
||||||
override val requiresReferer: Boolean = false
|
|
||||||
|
|
||||||
override suspend fun getUrl(
|
|
||||||
url: String,
|
|
||||||
referer: String?,
|
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
|
||||||
callback: (ExtractorLink) -> Unit
|
|
||||||
) {
|
|
||||||
val videoId = url.substringAfterLast("/")
|
|
||||||
val videoInfo = app.get("$apiUrl/api/streaming/assign/$videoId")
|
|
||||||
.parsed<StreamInfo>()
|
|
||||||
|
|
||||||
val streamUrl = "${videoInfo.url}/hls/${videoInfo.token}/master.m3u8"
|
|
||||||
callback.invoke(
|
|
||||||
newExtractorLink(
|
|
||||||
source = name,
|
|
||||||
name = name,
|
|
||||||
url = streamUrl,
|
|
||||||
type = ExtractorLinkType.M3U8
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Serializable
|
|
||||||
private data class StreamInfo(
|
|
||||||
@SerialName("url")
|
|
||||||
val url: String,
|
|
||||||
@SerialName("token")
|
|
||||||
val token: String
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -81,7 +81,6 @@ import com.lagradost.cloudstream3.extractors.FilemoonV2
|
||||||
import com.lagradost.cloudstream3.extractors.Filesim
|
import com.lagradost.cloudstream3.extractors.Filesim
|
||||||
import com.lagradost.cloudstream3.extractors.Multimoviesshg
|
import com.lagradost.cloudstream3.extractors.Multimoviesshg
|
||||||
import com.lagradost.cloudstream3.extractors.FlaswishCom
|
import com.lagradost.cloudstream3.extractors.FlaswishCom
|
||||||
import com.lagradost.cloudstream3.extractors.Flyfile
|
|
||||||
import com.lagradost.cloudstream3.extractors.FourCX
|
import com.lagradost.cloudstream3.extractors.FourCX
|
||||||
import com.lagradost.cloudstream3.extractors.FourPichive
|
import com.lagradost.cloudstream3.extractors.FourPichive
|
||||||
import com.lagradost.cloudstream3.extractors.FourPlayRu
|
import com.lagradost.cloudstream3.extractors.FourPlayRu
|
||||||
|
|
@ -1299,7 +1298,6 @@ val extractorApis: AtomicMutableList<ExtractorApi> = atomicListOf(
|
||||||
GUpload(),
|
GUpload(),
|
||||||
HlsWish(),
|
HlsWish(),
|
||||||
ByseQekaho(),
|
ByseQekaho(),
|
||||||
Flyfile()
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,12 @@
|
||||||
*/
|
*/
|
||||||
package com.lagradost.cloudstream3.utils
|
package com.lagradost.cloudstream3.utils
|
||||||
|
|
||||||
import com.lagradost.cloudstream3.base64DecodeArray
|
|
||||||
import io.ktor.http.Url
|
import io.ktor.http.Url
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.nio.ByteBuffer
|
import java.nio.ByteBuffer
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
import kotlin.io.encoding.Base64
|
||||||
|
import kotlin.io.encoding.ExperimentalEncodingApi
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object HlsPlaylistParser {
|
object HlsPlaylistParser {
|
||||||
|
|
@ -1168,6 +1169,7 @@ object HlsPlaylistParser {
|
||||||
return parseOptionalStringAttr(line, pattern, null, variableDefinitions)
|
return parseOptionalStringAttr(line, pattern, null, variableDefinitions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OptIn(ExperimentalEncodingApi::class)
|
||||||
@Throws(ParserException::class)
|
@Throws(ParserException::class)
|
||||||
private fun parseDrmSchemeData(
|
private fun parseDrmSchemeData(
|
||||||
line: String, keyFormat: String, variableDefinitions: Map<String, String>
|
line: String, keyFormat: String, variableDefinitions: Map<String, String>
|
||||||
|
|
@ -1179,7 +1181,7 @@ object HlsPlaylistParser {
|
||||||
return SchemeData(
|
return SchemeData(
|
||||||
uuid = C.WIDEVINE_UUID,
|
uuid = C.WIDEVINE_UUID,
|
||||||
mimeType = MimeTypes.VIDEO_MP4,
|
mimeType = MimeTypes.VIDEO_MP4,
|
||||||
data = base64DecodeArray(urlString.substring(urlString.indexOf(',')))
|
data = Base64.Default.decode(urlString.substring(urlString.indexOf(',')))
|
||||||
)
|
)
|
||||||
} else if (KEYFORMAT_WIDEVINE_PSSH_JSON == keyFormat) {
|
} else if (KEYFORMAT_WIDEVINE_PSSH_JSON == keyFormat) {
|
||||||
return SchemeData(
|
return SchemeData(
|
||||||
|
|
@ -1190,7 +1192,7 @@ object HlsPlaylistParser {
|
||||||
} else if (KEYFORMAT_PLAYREADY == keyFormat && "1" == keyFormatVersions) {
|
} else if (KEYFORMAT_PLAYREADY == keyFormat && "1" == keyFormatVersions) {
|
||||||
val urlString = parseStringAttr(line, REGEX_URI, variableDefinitions)
|
val urlString = parseStringAttr(line, REGEX_URI, variableDefinitions)
|
||||||
val data: ByteArray =
|
val data: ByteArray =
|
||||||
base64DecodeArray(urlString.substring(urlString.indexOf(',')))
|
Base64.Default.decode(urlString.substring(urlString.indexOf(',')))
|
||||||
val psshData: ByteArray =
|
val psshData: ByteArray =
|
||||||
PsshAtomUtil.buildPsshAtom(
|
PsshAtomUtil.buildPsshAtom(
|
||||||
systemId = C.PLAYREADY_UUID,
|
systemId = C.PLAYREADY_UUID,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue