This commit is contained in:
vfsfitvnm
2022-10-09 15:06:02 +02:00
parent e9a6156b12
commit c00a079715
6 changed files with 33 additions and 7 deletions

View File

@@ -34,7 +34,15 @@ suspend fun Innertube.player(body: PlayerBody) = runCatchingNonCancellable {
)
val safePlayerResponse = client.post(player) {
setBody(body.copy(context = Context.DefaultAgeRestrictionBypass))
setBody(
body.copy(
context = Context.DefaultAgeRestrictionBypass.copy(
thirdParty = Context.ThirdParty(
embedUrl = "https://www.youtube.com/watch?v=${body.videoId}"
)
),
)
)
mask("playabilityStatus.status,playerConfig.audioConfig,streamingData.adaptiveFormats")
}.body<PlayerResponse>()