WebContent: Don't check for specific audio backends

Rather than conditionalizing creating an audio plugin, just let the
audio backend factory return an error on its own. If an audio plugin
is not found, we will get a similar error to what is removed here.
This commit is contained in:
Timothy Flynn 2024-12-23 13:35:00 -05:00 committed by Andreas Kling
parent c51cd34bfb
commit 33a1e38646
Notes: github-actions[bot] 2024-12-25 11:01:41 +00:00

View file

@ -83,11 +83,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Web::Platform::AudioCodecPlugin::install_creation_hook([](auto loader) {
#if defined(HAVE_QT_MULTIMEDIA)
return Ladybird::AudioCodecPluginQt::create(move(loader));
#elif defined(AK_OS_MACOS) || defined(HAVE_PULSEAUDIO)
return Web::Platform::AudioCodecPluginAgnostic::create(move(loader));
#else
(void)loader;
return Error::from_string_literal("Don't know how to initialize audio in this configuration!");
return Web::Platform::AudioCodecPluginAgnostic::create(move(loader));
#endif
});