diff options
Diffstat (limited to 'WebCore/html')
| -rw-r--r-- | WebCore/html/HTMLMediaElement.cpp | 13 | ||||
| -rw-r--r-- | WebCore/html/HTMLMediaElement.h | 2 |
2 files changed, 3 insertions, 12 deletions
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp index f98200d..401d79f 100644 --- a/WebCore/html/HTMLMediaElement.cpp +++ b/WebCore/html/HTMLMediaElement.cpp @@ -555,13 +555,11 @@ void HTMLMediaElement::loadResource(const KURL& url, ContentType& contentType) m_player->load(m_currentSrc, contentType); -#if PLATFORM(ANDROID) if (isVideo() && m_player->canLoadPoster()) { KURL posterUrl = static_cast<HTMLVideoElement*>(this)->poster(); if (!posterUrl.isEmpty()) m_player->setPoster(posterUrl); } -#endif if (renderer()) renderer()->updateFromElement(); @@ -1443,15 +1441,13 @@ PassRefPtr<TimeRanges> HTMLMediaElement::seekable() const bool HTMLMediaElement::potentiallyPlaying() const { - return !paused() && m_readyState >= HAVE_FUTURE_DATA && !endedPlayback() && !stoppedDueToErrors() && !pausedForUserInteraction(); + return m_readyState >= HAVE_FUTURE_DATA && couldPlayIfEnoughData(); } -#if PLATFORM(ANDROID) bool HTMLMediaElement::couldPlayIfEnoughData() const { return !paused() && !endedPlayback() && !stoppedDueToErrors() && !pausedForUserInteraction(); } -#endif bool HTMLMediaElement::endedPlayback() const { @@ -1534,12 +1530,9 @@ void HTMLMediaElement::updatePlayState() float time = currentTime(); if (m_lastSeekTime < time) m_playedTimeRanges->add(m_lastSeekTime, time); -#if PLATFORM(ANDROID) - } else if (couldPlayIfEnoughData() && playerPaused) { + } else if (couldPlayIfEnoughData() && playerPaused) m_player->prepareToPlay(); -#endif - } - + if (renderer()) renderer()->updateFromElement(); } diff --git a/WebCore/html/HTMLMediaElement.h b/WebCore/html/HTMLMediaElement.h index 70b686e..9218ad6 100644 --- a/WebCore/html/HTMLMediaElement.h +++ b/WebCore/html/HTMLMediaElement.h @@ -227,9 +227,7 @@ private: bool endedPlayback() const; bool stoppedDueToErrors() const; bool pausedForUserInteraction() const; -#if PLATFORM(ANDROID) bool couldPlayIfEnoughData() const; -#endif float minTimeSeekable() const; float maxTimeSeekable() const; |
