diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webmediaplayer_impl.cc | 6 | ||||
-rw-r--r-- | webkit/glue/webmediaplayer_impl.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc index bc56f56..5df50d4 100644 --- a/webkit/glue/webmediaplayer_impl.cc +++ b/webkit/glue/webmediaplayer_impl.cc @@ -334,6 +334,12 @@ bool WebMediaPlayerImpl::hasVideo() const { return pipeline_->IsRendered(media::mime_type::kMajorTypeVideo); } +bool WebMediaPlayerImpl::hasAudio() const { + DCHECK(MessageLoop::current() == main_loop_); + + return pipeline_->IsRendered(media::mime_type::kMajorTypeAudio); +} + WebKit::WebSize WebMediaPlayerImpl::naturalSize() const { DCHECK(MessageLoop::current() == main_loop_); diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h index da1b142..bd4a6e8 100644 --- a/webkit/glue/webmediaplayer_impl.h +++ b/webkit/glue/webmediaplayer_impl.h @@ -183,6 +183,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, // True if a video is loaded. virtual bool hasVideo() const; + virtual bool hasAudio() const; // Dimensions of the video. virtual WebKit::WebSize naturalSize() const; |