2009-04-13 Eric Carlson <eric.carlson@apple.com>

        Reviewed by Mark Rowe.

        OS X standalone media documents should not switch from <video> to <embed> when 
        QTKit load state is QTMovieLoadStateLoading as that happens frequently when a loading
        with a slow network connection or when a movie is not saved fast-start.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivate::updateStates): Don't open movie with plug-in when QTKit's
        loadstate is QTMovieLoadStateLoading, wait until it drops below QTMovieLoadStateError.



git-svn-id: svn://svn.chromium.org/blink/trunk@42475 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6c250526
2009-04-13 Eric Carlson <eric.carlson@apple.com>
Reviewed by Mark Rowe.
OS X standalone media documents should not switch from <video> to <embed> when
QTKit load state is QTMovieLoadStateLoading as that happens frequently when a loading
with a slow network connection or when a movie is not saved fast-start.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivate::updateStates): Don't open movie with plug-in when QTKit's
loadstate is QTMovieLoadStateLoading, wait until it drops below QTMovieLoadStateError.
2009-04-13 Dmitry Titov <dimich@chromium.org> 2009-04-13 Dmitry Titov <dimich@chromium.org>
Reviewed by Darin Adler. Reviewed by Darin Adler.
...@@ -678,18 +678,17 @@ void MediaPlayerPrivate::updateStates() ...@@ -678,18 +678,17 @@ void MediaPlayerPrivate::updateStates()
m_readyState = MediaPlayer::HaveMetadata; m_readyState = MediaPlayer::HaveMetadata;
m_networkState = MediaPlayer::Loading; m_networkState = MediaPlayer::Loading;
} else if (loadState > QTMovieLoadStateError) { } else if (loadState > QTMovieLoadStateError) {
m_readyState = MediaPlayer::HaveNothing;
m_networkState = MediaPlayer::Loading;
} else {
if (m_player->inMediaDocument()) { if (m_player->inMediaDocument()) {
// Something went wrong in the loading of media within a standalone file. // Something went wrong in the loading of media within a standalone file.
// This can occur with chained refmovies pointing to streamed media. // This can occur with chained refmovies pointing to streamed media.
sawUnsupportedTracks(); sawUnsupportedTracks();
return; return;
} else {
m_readyState = MediaPlayer::HaveNothing;
m_networkState = MediaPlayer::Loading;
} }
} else {
float loaded = maxTimeLoaded();
float loaded = maxTimeLoaded();
if (!loaded) if (!loaded)
m_readyState = MediaPlayer::HaveNothing; m_readyState = MediaPlayer::HaveNothing;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment