1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chromecast/browser/media/cast_media_client_android.h"
7 #include "chromecast/media/base/key_systems_common.h"
12 CastMediaClientAndroid::CastMediaClientAndroid() {
15 CastMediaClientAndroid::~CastMediaClientAndroid() {
18 void CastMediaClientAndroid::AddKeySystemUUIDMappings(KeySystemUuidMap
* map
) {
19 // Note: MediaDrmBridge adds the Widevine UUID mapping automatically.
20 #if defined(PLAYREADY_CDM_AVAILABLE)
21 (*map
)[kChromecastPlayreadyKeySystem
] = playready_delegate_
.GetUUID();
24 auto platform_mappings
= GetPlatformKeySystemUUIDMappings();
25 for (const auto& mapping
: platform_mappings
)
29 ::media::MediaDrmBridgeDelegate
*
30 CastMediaClientAndroid::GetMediaDrmBridgeDelegate(
31 const ::media::UUID
& scheme_uuid
) {
32 #if defined(PLAYREADY_CDM_AVAILABLE)
33 if (scheme_uuid
== playready_delegate_
.GetUUID())
34 return &playready_delegate_
;
37 if (scheme_uuid
== widevine_delegate_
.GetUUID())
38 return &widevine_delegate_
;
44 } // namespace chromecast