-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
150 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
third_party/blink/renderer/modules/encryptedmedia/media_keys_extensions.idl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2025 The Cobalt Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// https://w3c.github.io/encrypted-media/#mediakeys-interface | ||
|
||
[ | ||
Exposed=Window, | ||
ActiveScriptWrappable, | ||
SecureContext, | ||
ImplementedAs=MediaKeysGetMetrics | ||
] partial interface MediaKeys { | ||
[RaisesException] Uint8Array getMetrics(); | ||
}; |
32 changes: 32 additions & 0 deletions
32
third_party/blink/renderer/modules/encryptedmedia/media_keys_get_metrics.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2024 The Cobalt Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "third_party/blink/renderer/modules/encryptedmedia/media_keys_get_metrics.h" | ||
|
||
#include "third_party/blink/renderer/modules/encryptedmedia/media_keys.h" | ||
#include "third_party/blink/renderer/platform/bindings/exception_state.h" | ||
|
||
#if !BUILDFLAG(USE_STARBOARD_MEDIA) | ||
#error "This file only works with Starboard media" | ||
#endif // !BUILDFLAG(USE_STARBOARD_MEDIA) | ||
|
||
namespace blink { | ||
|
||
// static | ||
NotShared<DOMUint8Array> MediaKeysGetMetrics::getMetrics(MediaKeys& media_keys, ExceptionState& exception_state) { | ||
return media_keys.getMetrics(exception_state); | ||
} | ||
|
||
|
||
} // namespace blink |
35 changes: 35 additions & 0 deletions
35
third_party/blink/renderer/modules/encryptedmedia/media_keys_get_metrics.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2025 The Cobalt Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_ENCRYPTEDMEDIA_MEDIA_KEYS_GET_METRICS_H_ | ||
#define THIRD_PARTY_BLINK_RENDERER_MODULES_ENCRYPTEDMEDIA_MEDIA_KEYS_GET_METRICS_H_ | ||
|
||
#include "third_party/blink/renderer/core/typed_arrays/array_buffer_view_helpers.h" | ||
#include "third_party/blink/renderer/core/typed_arrays/dom_typed_array.h" | ||
|
||
namespace blink { | ||
|
||
class MediaKeys; | ||
|
||
class MediaKeysGetMetrics { | ||
STATIC_ONLY(MediaKeysGetMetrics); | ||
|
||
public: | ||
static NotShared<DOMUint8Array> getMetrics(MediaKeys&, ExceptionState&); | ||
}; | ||
|
||
} // namespace blink | ||
|
||
#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_ENCRYPTEDMEDIA_MEDIA_KEYS_GET_METRICS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters