Skip to content

Commit

Permalink
YouTubeClient: add isEmbedded for clients
Browse files Browse the repository at this point in the history
  • Loading branch information
gechoto authored Jan 17, 2025
1 parent 166ebdb commit 89fc1a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class InnerTube {
setBody(
PlayerBody(
context = client.toContext(locale, visitorData).let {
if (client == YouTubeClient.TVHTML5_SIMPLY_EMBEDDED_PLAYER) {
if (client.isEmbedded) {
it.copy(
thirdParty = Context.ThirdParty(
embedUrl = "https://www.youtube.com/watch?v=${videoId}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ data class YouTubeClient(
val loginSupported: Boolean = false,
val loginRequired: Boolean = false,
val useSignatureTimestamp: Boolean = false,
val isEmbedded: Boolean = false,
// val origin: String? = null,
// val referer: String? = null,
) {
Expand Down Expand Up @@ -70,6 +71,7 @@ data class YouTubeClient(
loginSupported = true,
loginRequired = true,
useSignatureTimestamp = true,
isEmbedded = true,
)

val IOS = YouTubeClient(
Expand Down

0 comments on commit 89fc1a0

Please sign in to comment.