mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 15:09:42 +00:00
LibWeb/EME: Implement MediaKeySystemAccess
This commit is contained in:
parent
cc50b30399
commit
b1c1e33bae
Notes:
github-actions[bot]
2025-08-27 07:59:52 +00:00
Author: https://github.com/stelar7
Commit: b1c1e33bae
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5665
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/trflynn89
11 changed files with 147 additions and 13 deletions
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) 2025, stelar7 <dudedbz@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/MediaKeySystemAccessPrototype.h>
|
||||
#include <LibWeb/EncryptedMediaExtensions/MediaKeySystemAccess.h>
|
||||
|
||||
namespace Web::EncryptedMediaExtensions {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(MediaKeySystemAccess);
|
||||
|
||||
MediaKeySystemAccess::~MediaKeySystemAccess() = default;
|
||||
|
||||
MediaKeySystemAccess::MediaKeySystemAccess(JS::Realm& realm, Utf16String const& key_system, Bindings::MediaKeySystemConfiguration configuration, NonnullOwnPtr<KeySystem> cdm_implementation)
|
||||
: PlatformObject(realm)
|
||||
, m_key_system(key_system)
|
||||
, m_configuration(move(configuration))
|
||||
, m_cdm_implementation(move(cdm_implementation))
|
||||
{
|
||||
}
|
||||
|
||||
GC::Ref<MediaKeySystemAccess> MediaKeySystemAccess::create(JS::Realm& realm, Utf16String const& key_system, Bindings::MediaKeySystemConfiguration configuration, NonnullOwnPtr<KeySystem> cdm_implementation)
|
||||
{
|
||||
return realm.create<MediaKeySystemAccess>(realm, key_system, configuration, move(cdm_implementation));
|
||||
}
|
||||
|
||||
void MediaKeySystemAccess::initialize(JS::Realm& realm)
|
||||
{
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(MediaKeySystemAccess);
|
||||
Base::initialize(realm);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue