Chrome blocks autoplay
атрибут тега "video".
Вот код в chrome_content_browser_client.cc
:
bool IsAutoplayAllowedByPolicy(content::WebContents* contents,
PrefService* prefs) {
DCHECK(prefs);
// Check if we have globally allowed autoplay by policy.
if (prefs->GetBoolean(prefs::kAutoplayAllowed) &&
prefs->IsManagedPreference(prefs::kAutoplayAllowed)) {
return true;
}
if (!contents)
return false;
// Check if the current URL matches a URL pattern on the whitelist.
const base::ListValue* autoplay_whitelist =
prefs->GetList(prefs::kAutoplayWhitelist);
return autoplay_whitelist &&
prefs->IsManagedPreference(prefs::kAutoplayWhitelist) &&
IsURLWhitelisted(contents->GetURL(), autoplay_whitelist->GetList());
}
Как мы видим, здесь есть белый список некоторых сайтов.
Я пытался найти их из исходного кода хрома, но не смог.
Как я могу получить этот список?