mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
LibWebView+WebContent+UI: Migrate to the new autoplay settings
This removes the old autoplay allowlist file in favor of the new site setting. We still support the command-line flag to enable autoplay globally, as this is needed for WPT.
This commit is contained in:
parent
223b04f087
commit
ed265b568d
Notes:
github-actions[bot]
2025-03-30 15:20:08 +00:00
Author: https://github.com/trflynn89
Commit: ed265b568d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4146
Reviewed-by: https://github.com/tcl3 ✅
20 changed files with 17 additions and 137 deletions
|
@ -104,12 +104,6 @@ BrowserWindow::BrowserWindow(Vector<URL::URL> const& initial_urls, IsPopupWindow
|
|||
});
|
||||
});
|
||||
|
||||
QObject::connect(Settings::the(), &Settings::enable_autoplay_changed, this, [this](bool enable) {
|
||||
for_each_tab([enable](auto& tab) {
|
||||
tab.set_enable_autoplay(enable);
|
||||
});
|
||||
});
|
||||
|
||||
QObject::connect(Settings::the(), &Settings::preferred_languages_changed, this, [this](QStringList languages) {
|
||||
Vector<String> preferred_languages;
|
||||
preferred_languages.ensure_capacity(languages.length());
|
||||
|
@ -881,7 +875,6 @@ void BrowserWindow::initialize_tab(Tab* tab)
|
|||
tab->set_preferred_languages(preferred_languages);
|
||||
tab->set_navigator_compatibility_mode(navigator_compatibility_mode());
|
||||
tab->set_enable_do_not_track(Settings::the()->enable_do_not_track());
|
||||
tab->set_enable_autoplay(WebView::Application::web_content_options().enable_autoplay == WebView::EnableAutoplay::Yes || Settings::the()->enable_autoplay());
|
||||
tab->view().set_preferred_color_scheme(m_preferred_color_scheme);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue