SourceBufferList.h 817 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/DOM/EventTarget.h>
  8. namespace Web::MediaSourceExtensions {
  9. // https://w3c.github.io/media-source/#dom-sourcebufferlist
  10. class SourceBufferList : public DOM::EventTarget {
  11. WEB_PLATFORM_OBJECT(SourceBufferList, DOM::EventTarget);
  12. GC_DECLARE_ALLOCATOR(SourceBufferList);
  13. public:
  14. void set_onaddsourcebuffer(GC::Ptr<WebIDL::CallbackType>);
  15. GC::Ptr<WebIDL::CallbackType> onaddsourcebuffer();
  16. void set_onremovesourcebuffer(GC::Ptr<WebIDL::CallbackType>);
  17. GC::Ptr<WebIDL::CallbackType> onremovesourcebuffer();
  18. private:
  19. SourceBufferList(JS::Realm&);
  20. virtual ~SourceBufferList() override;
  21. virtual void initialize(JS::Realm&) override;
  22. };
  23. }