Index: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
index 167b3807b3fc283d8f40ee9979b54104698730aa..00a0aef6178a9efacf836c1e00b5c65b42ffd400 100644 |
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
@@ -58,6 +58,7 @@ |
#include "modules/device_orientation/DeviceOrientationController.h" |
#include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" |
#include "modules/gamepad/NavigatorGamepad.h" |
+#include "modules/mediasession/HTMLMediaElementMediaSession.h" |
#include "modules/mediasession/MediaSession.h" |
#include "modules/serviceworkers/NavigatorServiceWorker.h" |
#include "modules/storage/DOMWindowStorageController.h" |
@@ -818,11 +819,15 @@ PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( |
if (!webFrame || !webFrame->client()) |
return nullptr; |
+ WebMediaSession* webMediaSession = nullptr; |
+ if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlMediaElement)) |
+ webMediaSession = mediaSession->webMediaSession(); |
+ |
HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMedia::from(htmlMediaElement); |
WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); |
return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, loadType, url, |
client, &encryptedMedia, |
- encryptedMedia.contentDecryptionModule(), sinkId)); |
+ encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession)); |
} |
PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() |