LibWeb: Remove now-unused HTMLMediaElement::toggle_playback()

This function never worked properly anyway.
This commit is contained in:
Zaggy1024 2026-03-30 04:14:48 -05:00 committed by Gregory Bertilson
parent f02e9174c7
commit 99fef15c7f
2 changed files with 0 additions and 12 deletions

View file

@ -547,17 +547,6 @@ void HTMLMediaElement::pause()
pause_element();
}
void HTMLMediaElement::toggle_playback()
{
// AD-HOC: An execution context is required for Promise creation hooks.
TemporaryExecutionContext execution_context { realm() };
if (potentially_playing())
pause();
else
play();
}
// https://html.spec.whatwg.org/multipage/media.html#dom-media-volume
WebIDL::ExceptionOr<void> HTMLMediaElement::set_volume(double volume)
{

View file

@ -125,7 +125,6 @@ public:
bool potentially_playing() const;
GC::Ref<WebIDL::Promise> play();
void pause();
void toggle_playback();
double volume() const { return m_volume; }
WebIDL::ExceptionOr<void> set_volume(double);