mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/BufferedChangeEventPrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/MediaSourceExtensions/BufferedChangeEvent.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(BufferedChangeEvent);
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<BufferedChangeEvent>> BufferedChangeEvent::construct_impl(JS::Realm& realm, AK::FlyString const& type, BufferedChangeEventInit const& event_init)
|
||||
{
|
||||
return realm.heap().allocate<BufferedChangeEvent>(realm, realm, type, event_init);
|
||||
}
|
||||
|
||||
BufferedChangeEvent::BufferedChangeEvent(JS::Realm& realm, AK::FlyString const& type, BufferedChangeEventInit const&)
|
||||
: DOM::Event(realm, type)
|
||||
{
|
||||
}
|
||||
|
||||
BufferedChangeEvent::~BufferedChangeEvent() = default;
|
||||
|
||||
void BufferedChangeEvent::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(BufferedChangeEvent);
|
||||
}
|
||||
|
||||
}
|
35
Libraries/LibWeb/MediaSourceExtensions/BufferedChangeEvent.h
Normal file
35
Libraries/LibWeb/MediaSourceExtensions/BufferedChangeEvent.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/HTML/TimeRanges.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
struct BufferedChangeEventInit : public DOM::EventInit {
|
||||
JS::GCPtr<HTML::TimeRanges> added_ranges;
|
||||
JS::GCPtr<HTML::TimeRanges> removed_ranges;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/media-source/#bufferedchangeevent-interface
|
||||
class BufferedChangeEvent : public DOM::Event {
|
||||
WEB_PLATFORM_OBJECT(BufferedChangeEvent, DOM::Event);
|
||||
JS_DECLARE_ALLOCATOR(BufferedChangeEvent);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static WebIDL::ExceptionOr<JS::NonnullGCPtr<BufferedChangeEvent>> construct_impl(JS::Realm&, FlyString const& type, BufferedChangeEventInit const& = {});
|
||||
|
||||
private:
|
||||
BufferedChangeEvent(JS::Realm&, FlyString const& type, BufferedChangeEventInit const& event_init);
|
||||
|
||||
virtual ~BufferedChangeEvent() override;
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
#import <DOM/Event.idl>
|
||||
#import <HTML/TimeRanges.idl>
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-bufferedchangeevent
|
||||
[Exposed=(Window,DedicatedWorker)]
|
||||
interface BufferedChangeEvent : Event {
|
||||
constructor(DOMString type, optional BufferedChangeEventInit eventInitDict = {});
|
||||
|
||||
[FIXME,SameObject] readonly attribute TimeRanges addedRanges;
|
||||
[FIXME,SameObject] readonly attribute TimeRanges removedRanges;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-bufferedchangeeventinit
|
||||
dictionary BufferedChangeEventInit : EventInit {
|
||||
TimeRanges addedRanges;
|
||||
TimeRanges removedRanges;
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/ManagedMediaSourcePrototype.h>
|
||||
#include <LibWeb/MediaSourceExtensions/ManagedMediaSource.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(ManagedMediaSource);
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<ManagedMediaSource>> ManagedMediaSource::construct_impl(JS::Realm& realm)
|
||||
{
|
||||
return realm.heap().allocate<ManagedMediaSource>(realm, realm);
|
||||
}
|
||||
|
||||
ManagedMediaSource::ManagedMediaSource(JS::Realm& realm)
|
||||
: MediaSource(realm)
|
||||
{
|
||||
}
|
||||
|
||||
ManagedMediaSource::~ManagedMediaSource() = default;
|
||||
|
||||
void ManagedMediaSource::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(ManagedMediaSource);
|
||||
}
|
||||
|
||||
}
|
29
Libraries/LibWeb/MediaSourceExtensions/ManagedMediaSource.h
Normal file
29
Libraries/LibWeb/MediaSourceExtensions/ManagedMediaSource.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/MediaSourceExtensions/MediaSource.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
// https://w3c.github.io/media-source/#managedmediasource-interface
|
||||
class ManagedMediaSource : public MediaSource {
|
||||
WEB_PLATFORM_OBJECT(ManagedMediaSource, MediaSource);
|
||||
JS_DECLARE_ALLOCATOR(ManagedMediaSource);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static WebIDL::ExceptionOr<JS::NonnullGCPtr<ManagedMediaSource>> construct_impl(JS::Realm&);
|
||||
|
||||
private:
|
||||
ManagedMediaSource(JS::Realm&);
|
||||
|
||||
virtual ~ManagedMediaSource() override;
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#import <DOM/EventHandler.idl>
|
||||
#import <MediaSourceExtensions/MediaSource.idl>
|
||||
|
||||
// https://w3c.github.io/media-source/#managedmediasource-interface
|
||||
[Exposed=(Window,DedicatedWorker)]
|
||||
interface ManagedMediaSource : MediaSource {
|
||||
constructor();
|
||||
[FIXME] readonly attribute boolean streaming;
|
||||
[FIXME] attribute EventHandler onstartstreaming;
|
||||
[FIXME] attribute EventHandler onendstreaming;
|
||||
};
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/ManagedSourceBufferPrototype.h>
|
||||
#include <LibWeb/MediaSourceExtensions/ManagedSourceBuffer.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(ManagedSourceBuffer);
|
||||
|
||||
ManagedSourceBuffer::ManagedSourceBuffer(JS::Realm& realm)
|
||||
: SourceBuffer(realm)
|
||||
{
|
||||
}
|
||||
|
||||
ManagedSourceBuffer::~ManagedSourceBuffer() = default;
|
||||
|
||||
void ManagedSourceBuffer::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(ManagedSourceBuffer);
|
||||
}
|
||||
|
||||
}
|
27
Libraries/LibWeb/MediaSourceExtensions/ManagedSourceBuffer.h
Normal file
27
Libraries/LibWeb/MediaSourceExtensions/ManagedSourceBuffer.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/MediaSourceExtensions/SourceBuffer.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
// https://w3c.github.io/media-source/#managedsourcebuffer-interface
|
||||
class ManagedSourceBuffer : public SourceBuffer {
|
||||
WEB_PLATFORM_OBJECT(ManagedSourceBuffer, SourceBuffer);
|
||||
JS_DECLARE_ALLOCATOR(ManagedSourceBuffer);
|
||||
|
||||
public:
|
||||
private:
|
||||
ManagedSourceBuffer(JS::Realm&);
|
||||
|
||||
virtual ~ManagedSourceBuffer() override;
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
#import <DOM/EventHandler.idl>
|
||||
#import <MediaSourceExtensions/SourceBuffer.idl>
|
||||
|
||||
// https://w3c.github.io/media-source/#managedsourcebuffer-interface
|
||||
[Exposed=(Window,DedicatedWorker)]
|
||||
interface ManagedSourceBuffer : SourceBuffer {
|
||||
[FIXME] attribute EventHandler onbufferedchange;
|
||||
};
|
33
Libraries/LibWeb/MediaSourceExtensions/MediaSource.cpp
Normal file
33
Libraries/LibWeb/MediaSourceExtensions/MediaSource.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/MediaSourcePrototype.h>
|
||||
#include <LibWeb/MediaSourceExtensions/MediaSource.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(MediaSource);
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<MediaSource>> MediaSource::construct_impl(JS::Realm& realm)
|
||||
{
|
||||
return realm.heap().allocate<MediaSource>(realm, realm);
|
||||
}
|
||||
|
||||
MediaSource::MediaSource(JS::Realm& realm)
|
||||
: DOM::EventTarget(realm)
|
||||
{
|
||||
}
|
||||
|
||||
MediaSource::~MediaSource() = default;
|
||||
|
||||
void MediaSource::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(MediaSource);
|
||||
}
|
||||
|
||||
}
|
34
Libraries/LibWeb/MediaSourceExtensions/MediaSource.h
Normal file
34
Libraries/LibWeb/MediaSourceExtensions/MediaSource.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/DOM/EventTarget.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-mediasource
|
||||
class MediaSource : public DOM::EventTarget {
|
||||
WEB_PLATFORM_OBJECT(MediaSource, DOM::EventTarget);
|
||||
JS_DECLARE_ALLOCATOR(MediaSource);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static WebIDL::ExceptionOr<JS::NonnullGCPtr<MediaSource>> construct_impl(JS::Realm&);
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-mediasource-canconstructindedicatedworker
|
||||
static bool can_construct_in_dedicated_worker(JS::VM&) { return true; }
|
||||
|
||||
protected:
|
||||
MediaSource(JS::Realm&);
|
||||
|
||||
virtual ~MediaSource() override;
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
}
|
42
Libraries/LibWeb/MediaSourceExtensions/MediaSource.idl
Normal file
42
Libraries/LibWeb/MediaSourceExtensions/MediaSource.idl
Normal file
|
@ -0,0 +1,42 @@
|
|||
#import <DOM/EventHandler.idl>
|
||||
#import <MediaSourceExtensions/MediaSourceHandle.idl>
|
||||
#import <MediaSourceExtensions/SourceBufferList.idl>
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-mediasource
|
||||
enum ReadyState {
|
||||
"closed",
|
||||
"open",
|
||||
"ended",
|
||||
};
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-mediasource
|
||||
enum EndOfStreamError {
|
||||
"network",
|
||||
"decode",
|
||||
};
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-mediasource
|
||||
[Exposed=(Window,DedicatedWorker)]
|
||||
interface MediaSource : EventTarget {
|
||||
constructor();
|
||||
|
||||
[FIXME, SameObject, Exposed=DedicatedWorker]
|
||||
readonly attribute MediaSourceHandle handle;
|
||||
[FIXME] readonly attribute SourceBufferList sourceBuffers;
|
||||
[FIXME] readonly attribute SourceBufferList activeSourceBuffers;
|
||||
[FIXME] readonly attribute ReadyState readyState;
|
||||
|
||||
[FIXME] attribute unrestricted double duration;
|
||||
[FIXME] attribute EventHandler onsourceopen;
|
||||
[FIXME] attribute EventHandler onsourceended;
|
||||
[FIXME] attribute EventHandler onsourceclose;
|
||||
|
||||
static readonly attribute boolean canConstructInDedicatedWorker;
|
||||
|
||||
[FIXME] SourceBuffer addSourceBuffer(DOMString type);
|
||||
[FIXME] undefined removeSourceBuffer(SourceBuffer sourceBuffer);
|
||||
[FIXME] undefined endOfStream(optional EndOfStreamError error);
|
||||
[FIXME] undefined setLiveSeekableRange(double start, double end);
|
||||
[FIXME] undefined clearLiveSeekableRange();
|
||||
[FIXME] static boolean isTypeSupported(DOMString type);
|
||||
};
|
28
Libraries/LibWeb/MediaSourceExtensions/MediaSourceHandle.cpp
Normal file
28
Libraries/LibWeb/MediaSourceExtensions/MediaSourceHandle.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/MediaSourceHandlePrototype.h>
|
||||
#include <LibWeb/MediaSourceExtensions/MediaSourceHandle.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(MediaSourceHandle);
|
||||
|
||||
MediaSourceHandle::MediaSourceHandle(JS::Realm& realm)
|
||||
: Bindings::PlatformObject(realm)
|
||||
{
|
||||
}
|
||||
|
||||
MediaSourceHandle::~MediaSourceHandle() = default;
|
||||
|
||||
void MediaSourceHandle::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(MediaSourceHandle);
|
||||
}
|
||||
|
||||
}
|
28
Libraries/LibWeb/MediaSourceExtensions/MediaSourceHandle.h
Normal file
28
Libraries/LibWeb/MediaSourceExtensions/MediaSourceHandle.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-mediasourcehandle
|
||||
class MediaSourceHandle : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(MediaSourceHandle, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(MediaSourceHandle);
|
||||
|
||||
public:
|
||||
private:
|
||||
MediaSourceHandle(JS::Realm&);
|
||||
|
||||
virtual ~MediaSourceHandle() override;
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
// https://w3c.github.io/media-source/#dom-mediasourcehandle
|
||||
[Transferable, Exposed=(Window,DedicatedWorker)]
|
||||
interface MediaSourceHandle {};
|
28
Libraries/LibWeb/MediaSourceExtensions/SourceBuffer.cpp
Normal file
28
Libraries/LibWeb/MediaSourceExtensions/SourceBuffer.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/SourceBufferPrototype.h>
|
||||
#include <LibWeb/MediaSourceExtensions/SourceBuffer.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(SourceBuffer);
|
||||
|
||||
SourceBuffer::SourceBuffer(JS::Realm& realm)
|
||||
: DOM::EventTarget(realm)
|
||||
{
|
||||
}
|
||||
|
||||
SourceBuffer::~SourceBuffer() = default;
|
||||
|
||||
void SourceBuffer::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(SourceBuffer);
|
||||
}
|
||||
|
||||
}
|
28
Libraries/LibWeb/MediaSourceExtensions/SourceBuffer.h
Normal file
28
Libraries/LibWeb/MediaSourceExtensions/SourceBuffer.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/DOM/EventTarget.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-sourcebuffer
|
||||
class SourceBuffer : public DOM::EventTarget {
|
||||
WEB_PLATFORM_OBJECT(SourceBuffer, DOM::EventTarget);
|
||||
JS_DECLARE_ALLOCATOR(SourceBuffer);
|
||||
|
||||
protected:
|
||||
SourceBuffer(JS::Realm&);
|
||||
|
||||
virtual ~SourceBuffer() override;
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
}
|
36
Libraries/LibWeb/MediaSourceExtensions/SourceBuffer.idl
Normal file
36
Libraries/LibWeb/MediaSourceExtensions/SourceBuffer.idl
Normal file
|
@ -0,0 +1,36 @@
|
|||
#import <DOM/EventHandler.idl>
|
||||
#import <HTML/AudioTrackList.idl>
|
||||
#import <HTML/TextTrackList.idl>
|
||||
#import <HTML/VideoTrackList.idl>
|
||||
#import <HTML/TimeRanges.idl>
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-sourcebuffer
|
||||
enum AppendMode {
|
||||
"segments",
|
||||
"sequence",
|
||||
};
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-sourcebuffer
|
||||
[Exposed=(Window,DedicatedWorker)]
|
||||
interface SourceBuffer : EventTarget {
|
||||
[FIXME] attribute AppendMode mode;
|
||||
[FIXME] readonly attribute boolean updating;
|
||||
[FIXME] readonly attribute TimeRanges buffered;
|
||||
[FIXME] attribute double timestampOffset;
|
||||
[FIXME] readonly attribute AudioTrackList audioTracks;
|
||||
[FIXME] readonly attribute VideoTrackList videoTracks;
|
||||
[FIXME] readonly attribute TextTrackList textTracks;
|
||||
[FIXME] attribute double appendWindowStart;
|
||||
[FIXME] attribute unrestricted double appendWindowEnd;
|
||||
|
||||
[FIXME] attribute EventHandler onupdatestart;
|
||||
[FIXME] attribute EventHandler onupdate;
|
||||
[FIXME] attribute EventHandler onupdateend;
|
||||
[FIXME] attribute EventHandler onerror;
|
||||
[FIXME] attribute EventHandler onabort;
|
||||
|
||||
[FIXME] undefined appendBuffer(BufferSource data);
|
||||
[FIXME] undefined abort();
|
||||
[FIXME] undefined changeType(DOMString type);
|
||||
[FIXME] undefined remove(double start, unrestricted double end);
|
||||
};
|
28
Libraries/LibWeb/MediaSourceExtensions/SourceBufferList.cpp
Normal file
28
Libraries/LibWeb/MediaSourceExtensions/SourceBufferList.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/SourceBufferListPrototype.h>
|
||||
#include <LibWeb/MediaSourceExtensions/SourceBufferList.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(SourceBufferList);
|
||||
|
||||
SourceBufferList::SourceBufferList(JS::Realm& realm)
|
||||
: DOM::EventTarget(realm)
|
||||
{
|
||||
}
|
||||
|
||||
SourceBufferList::~SourceBufferList() = default;
|
||||
|
||||
void SourceBufferList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(SourceBufferList);
|
||||
}
|
||||
|
||||
}
|
26
Libraries/LibWeb/MediaSourceExtensions/SourceBufferList.h
Normal file
26
Libraries/LibWeb/MediaSourceExtensions/SourceBufferList.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/DOM/EventTarget.h>
|
||||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-sourcebufferlist
|
||||
class SourceBufferList : public DOM::EventTarget {
|
||||
WEB_PLATFORM_OBJECT(SourceBufferList, DOM::EventTarget);
|
||||
JS_DECLARE_ALLOCATOR(SourceBufferList);
|
||||
|
||||
private:
|
||||
SourceBufferList(JS::Realm&);
|
||||
|
||||
virtual ~SourceBufferList() override;
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
13
Libraries/LibWeb/MediaSourceExtensions/SourceBufferList.idl
Normal file
13
Libraries/LibWeb/MediaSourceExtensions/SourceBufferList.idl
Normal file
|
@ -0,0 +1,13 @@
|
|||
#import <DOM/EventHandler.idl>
|
||||
#import <MediaSourceExtensions/SourceBuffer.idl>
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-sourcebufferlist
|
||||
[Exposed=(Window,DedicatedWorker)]
|
||||
interface SourceBufferList : EventTarget {
|
||||
[FIXME] readonly attribute unsigned long length;
|
||||
|
||||
[FIXME] attribute EventHandler onaddsourcebuffer;
|
||||
[FIXME] attribute EventHandler onremovesourcebuffer;
|
||||
|
||||
[FIXME] getter SourceBuffer (unsigned long index);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue