summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-25 21:27:56 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-25 21:27:56 +0000
commitd8840af49b31dd126dcf37b581d963350a6111de (patch)
treee1d313433d754361a268f1e9227821d8ae401fc6
parent16870e1dc8a5b55d1f93c01492a6bd440ade35e9 (diff)
downloadchromium_src-d8840af49b31dd126dcf37b581d963350a6111de.zip
chromium_src-d8840af49b31dd126dcf37b581d963350a6111de.tar.gz
chromium_src-d8840af49b31dd126dcf37b581d963350a6111de.tar.bz2
Fix for audio/video not firing ended if you change src and call load().
Another instance of HTMLMediaElement becoming out of sync with WebMediaPlayerImpl. Most of these bugs are a result of HTMLMediaElement re-creating WebMediaPlayerImpl whenever src changes but not completely resetting internal state, causing inconsistent behaviour. BUG=16768,20152 TEST=change src and call load(), wait until the end of the clip -- ended should fire Review URL: http://codereview.chromium.org/173388 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24331 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/webmediaplayer_impl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index 9396037..49d29e0 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -266,7 +266,11 @@ void WebMediaPlayerImpl::seek(float seconds) {
// seek(0) internally. Avoid doing seek(0) the second time because this will
// cause extra pre-rolling and will break servers without range request
// support.
+ //
+ // We still have to notify WebKit that time has changed otherwise
+ // HTMLMediaElement gets into an inconsistent state.
if (pipeline_->GetCurrentTime().ToInternalValue() == 0 && seconds == 0) {
+ GetClient()->timeChanged();
return;
}