mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
LibWeb: Allow toggling playback of media elements with keyboard controls
This allows pausing/playing media elements with the space bar.
This commit is contained in:
parent
2c5c815f44
commit
a4070b1452
3 changed files with 22 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <AK/Optional.h>
|
||||
#include <AK/Time.h>
|
||||
#include <AK/Variant.h>
|
||||
#include <Kernel/API/KeyCode.h>
|
||||
#include <LibGfx/Rect.h>
|
||||
#include <LibJS/Heap/MarkedVector.h>
|
||||
#include <LibJS/SafeFunction.h>
|
||||
|
@ -99,6 +100,8 @@ public:
|
|||
JS::NonnullGCPtr<AudioTrackList> audio_tracks() const { return *m_audio_tracks; }
|
||||
JS::NonnullGCPtr<VideoTrackList> video_tracks() const { return *m_video_tracks; }
|
||||
|
||||
WebIDL::ExceptionOr<void> handle_keydown(Badge<Web::EventHandler>, KeyCode);
|
||||
|
||||
enum class MouseTrackingComponent {
|
||||
Timeline,
|
||||
Volume,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue