Interface PoTokenProvider
poTokens to YouTube player requests.
On some major clients, YouTube requires that the integrity of the device passes some checks to allow playback.
These checks involve running codes to verify the integrity and using their result to generate
one or multiple poToken(s) (which stands for proof of origin token(s)).
These tokens may have a role in triggering the sign in requirement.
If an implementation does not want to return a poToken for a specific client, it must
return null.
Implementations of this interface are expected to be thread-safe, as they may be accessed by multiple threads.
-
Method Summary
Modifier and TypeMethodDescriptiongetWebClientPoToken(String videoId) Get aPoTokenResultspecific to the desktop website, a.k.a.
-
Method Details
-
getWebClientPoToken
Get aPoTokenResultspecific to the desktop website, a.k.a. the WEB InnerTube client.To be generated and valid,
poTokens from this client must be generated using Google's BotGuard machine, which requires a JavaScript engine with a good DOM implementation. They must be added to adaptive/DASH streaming URLs with thepotparameter.Note that YouTube desktop website generates two
poTokens: - one for the player requestspoTokens, using the videoId as the minter value; - one for the streaming URLs, using a visitor data for logged-out users as the minter value.- Returns:
- a
PoTokenResultspecific to the WEB InnerTube client or null if it cannot get one
-