mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Add MediaSourceExtensions events
Continuing the boilerplate for these interfaces.
This commit is contained in:
committed by
Luke Wilde
parent
ff791a63fc
commit
66530086a4
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/ManagedMediaSourcePrototype.h>
|
||||
#include <LibWeb/MediaSourceExtensions/EventNames.h>
|
||||
#include <LibWeb/MediaSourceExtensions/ManagedMediaSource.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
@@ -30,4 +31,28 @@ void ManagedMediaSource::initialize(JS::Realm& realm)
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(ManagedMediaSource);
|
||||
}
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-managedmediasource-onstartstreaming
|
||||
void ManagedMediaSource::set_onstartstreaming(GC::Ptr<WebIDL::CallbackType> event_handler)
|
||||
{
|
||||
set_event_handler_attribute(EventNames::startstreaming, event_handler);
|
||||
}
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-managedmediasource-onstartstreaming
|
||||
GC::Ptr<WebIDL::CallbackType> ManagedMediaSource::onstartstreaming()
|
||||
{
|
||||
return event_handler_attribute(EventNames::startstreaming);
|
||||
}
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-managedmediasource-onendstreaming
|
||||
void ManagedMediaSource::set_onendstreaming(GC::Ptr<WebIDL::CallbackType> event_handler)
|
||||
{
|
||||
set_event_handler_attribute(EventNames::endstreaming, event_handler);
|
||||
}
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-managedmediasource-onendstreaming
|
||||
GC::Ptr<WebIDL::CallbackType> ManagedMediaSource::onendstreaming()
|
||||
{
|
||||
return event_handler_attribute(EventNames::endstreaming);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user