summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLMediaElement.cpp
diff options
context:
space:
mode:
authorandroid-build SharedAccount <android-build@sekiwake.mtv.corp.google.com>2009-10-01 08:43:40 -0700
committerandroid-build SharedAccount <android-build@sekiwake.mtv.corp.google.com>2009-10-01 08:43:40 -0700
commita0d5dbfcbb7c62ec014dd3033ef3efac4ecd3b79 (patch)
treedc76673f3ef10079419f664badff73b5b3118e9d /WebCore/html/HTMLMediaElement.cpp
parent0fade321435f38382c614ade7b64e6b68440d747 (diff)
parent8b101d480f638c14f332d4be73a74925bfed1d82 (diff)
downloadexternal_webkit-a0d5dbfcbb7c62ec014dd3033ef3efac4ecd3b79.zip
external_webkit-a0d5dbfcbb7c62ec014dd3033ef3efac4ecd3b79.tar.gz
external_webkit-a0d5dbfcbb7c62ec014dd3033ef3efac4ecd3b79.tar.bz2
Merge commit 'goog/eclair' into eclair-release
Diffstat (limited to 'WebCore/html/HTMLMediaElement.cpp')
-rw-r--r--WebCore/html/HTMLMediaElement.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index 17a3110..f98200d 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -1446,6 +1446,13 @@ bool HTMLMediaElement::potentiallyPlaying() const
return !paused() && m_readyState >= HAVE_FUTURE_DATA && !endedPlayback() && !stoppedDueToErrors() && !pausedForUserInteraction();
}
+#if PLATFORM(ANDROID)
+bool HTMLMediaElement::couldPlayIfEnoughData() const
+{
+ return !paused() && !endedPlayback() && !stoppedDueToErrors() && !pausedForUserInteraction();
+}
+#endif
+
bool HTMLMediaElement::endedPlayback() const
{
if (!m_player || m_readyState < HAVE_METADATA)
@@ -1527,6 +1534,10 @@ void HTMLMediaElement::updatePlayState()
float time = currentTime();
if (m_lastSeekTime < time)
m_playedTimeRanges->add(m_lastSeekTime, time);
+#if PLATFORM(ANDROID)
+ } else if (couldPlayIfEnoughData() && playerPaused) {
+ m_player->prepareToPlay();
+#endif
}
if (renderer())