Index: Source/web/WebMediaPlayerClientImpl.cpp |
diff --git a/Source/web/WebMediaPlayerClientImpl.cpp b/Source/web/WebMediaPlayerClientImpl.cpp |
index 8593babb030dd25dc76c21f42efd80ca4000cce7..5729eecafda176debc2b859d1b0f5540b2188847 100644 |
--- a/Source/web/WebMediaPlayerClientImpl.cpp |
+++ b/Source/web/WebMediaPlayerClientImpl.cpp |
@@ -12,6 +12,7 @@ |
#include "WebViewImpl.h" |
#include "core/frame/Frame.h" |
#include "core/html/HTMLMediaElement.h" |
+#include "core/html/HTMLVideoElement.h" |
#include "core/html/TimeRanges.h" |
#include "core/rendering/RenderLayerCompositor.h" |
#include "core/rendering/RenderView.h" |
@@ -228,6 +229,7 @@ void WebMediaPlayerClientImpl::loadInternal() |
// FIXME: Remove this cast |
Frame* frame = static_cast<HTMLMediaElement*>(m_client)->document().frame(); |
+ WebURL poster = static_cast<HTMLVideoElement*>(m_client)->posterImageURL(); |
acolwell GONE FROM CHROMIUM
2014/02/11 02:02:49
You can't blindly cast like this. m_client may be
|
// This does not actually check whether the hardware can support accelerated |
// compositing, but only if the flag is set. However, this is checked lazily |
@@ -242,6 +244,9 @@ void WebMediaPlayerClientImpl::loadInternal() |
m_audioSourceProvider.wrap(m_webMediaPlayer->audioSourceProvider()); |
#endif |
+ // Tell WebMediaPlayer about the poster image URL. |
+ m_webMediaPlayer->setPoster(poster); |
+ |
// Tell WebMediaPlayer about any connected CDM (may be null). |
m_webMediaPlayer->setContentDecryptionModule(m_cdm); |
@@ -407,6 +412,12 @@ void WebMediaPlayerClientImpl::setMuted(bool muted) |
m_webMediaPlayer->setVolume(muted ? 0 : m_volume); |
} |
+void WebMediaPlayerClientImpl::setPoster(const KURL& poster) |
+{ |
+ if (m_webMediaPlayer) |
+ m_webMediaPlayer->setPoster(WebURL(poster)); |
+} |
+ |
MediaPlayer::NetworkState WebMediaPlayerClientImpl::networkState() const |
{ |
if (m_webMediaPlayer) |