HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly...
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Jan 2015 18:50:55 +0000 (18:50 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Jan 2015 18:50:55 +0000 (18:50 +0000)
commit9f791f854a4f9445eaef88adbc61aa62e19c8e74
tree89702ee2a3d3a77048fe2345909e02c5a5bf0c15
parentb50056f161f7392d0a0d68b6e6e2741c6ac8d95d
HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly muted by script.
https://bugs.webkit.org/show_bug.cgi?id=140524

Reviewed by Andreas Kling.

Source/WebCore:

Test: media/muted-video-is-playing-audio.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
Call Document::updateIsPlayingAudio() to recalculate the overall audio playing state.
(WebCore::HTMLMediaElement::isPlayingAudio):
HTMLMediaElement::isPlayingAudio() should return false if the media element is explicitly muted.

LayoutTests:

The test contains a looping video. It makes sure initially Page::isPlayingAudio() returns true.
It should return false after the video is muted, and true again after the video is unmuted.

* media/muted-video-is-playing-audio-expected.txt: Added.
* media/muted-video-is-playing-audio.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/muted-video-is-playing-audio-expected.txt [new file with mode: 0644]
LayoutTests/media/muted-video-is-playing-audio.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp