Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Unified Diff: content/browser/android/browser_media_player_manager.cc

Issue 23545029: EME: Handle NO_KEY and resume playback after key is added. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/gpu/media/android_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/browser_media_player_manager.cc
diff --git a/content/browser/android/browser_media_player_manager.cc b/content/browser/android/browser_media_player_manager.cc
index ec5c2b4e00c4ee187b0dc2c4e9d34b50ad3d2131..daba884a0577e3c1e869e6e4f85c692fb1d856bf 100644
--- a/content/browser/android/browser_media_player_manager.cc
+++ b/content/browser/android/browser_media_player_manager.cc
@@ -474,10 +474,17 @@ void BrowserMediaPlayerManager::OnAddKey(int media_keys_id,
const std::vector<uint8>& init_data,
const std::string& session_id) {
MediaDrmBridge* drm_bridge = GetDrmBridge(media_keys_id);
- if (drm_bridge) {
- drm_bridge->AddKey(&key[0], key.size(), &init_data[0], init_data.size(),
- session_id);
- }
+ if (!drm_bridge)
+ return;
+
+ drm_bridge->AddKey(&key[0], key.size(), &init_data[0], init_data.size(),
+ session_id);
+ // In EME v0.1b MediaKeys lives in the media element. So the |media_keys_id|
+ // is the same as the |player_id|.
+ // TODO(xhwang): Separate |media_keys_id| and |player_id|.
+ MediaPlayerAndroid* player = GetPlayer(media_keys_id);
+ if (player)
+ player->OnKeyAdded();
}
void BrowserMediaPlayerManager::OnCancelKeyRequest(
« no previous file with comments | « no previous file | content/common/gpu/media/android_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698