[Modern Media Controls] Media Controller: volume control support
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Oct 2016 23:35:14 +0000 (23:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Oct 2016 23:35:14 +0000 (23:35 +0000)
commit945a7b8247ac77635b085f71ef81b7fedb26478c
treef7ade64996ac50626d632936c58d9ab0791ceba2
parenta8e5f79c38ce5ea8a8ff6f46a1dc24aec7016bf0
[Modern Media Controls] Media Controller: volume control support
https://bugs.webkit.org/show_bug.cgi?id=163727

Patch by Antoine Quint <graouts@apple.com> on 2016-10-28
Reviewed by Dean Jackson.

Source/WebCore:

We introduce the VolumeSupport class which brings support for modifying the media
volume by interacting with the mute volume slider in the media controls and correctly
reflecting the media's volume should it be changed via the media API.

Tests: media/modern-media-controls/volume-support/volume-support-click.html
       media/modern-media-controls/volume-support/volume-support-drag.html
       media/modern-media-controls/volume-support/volume-support-media-api-mute.html
       media/modern-media-controls/volume-support/volume-support-media-api.html

* Modules/modern-media-controls/js-files:
* Modules/modern-media-controls/media/media-controller.js:
(MediaController):
* Modules/modern-media-controls/media/volume-support.js: Added.
(VolumeSupport.prototype.get control):
(VolumeSupport.prototype.get mediaEvents):
(VolumeSupport.prototype.controlValueWillStartChanging):
(VolumeSupport.prototype.controlValueDidChange):
(VolumeSupport.prototype.syncControl):
(VolumeSupport):
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Adding new tests for VolumeSupport and adding the new resource to other MediaController tests.

* http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html:
* media/modern-media-controls/elapsed-time-support/elapsed-time-support.html:
* media/modern-media-controls/media-controller/media-controller-constructor.html:
* media/modern-media-controls/media-controller/media-controller-resize.html:
* media/modern-media-controls/mute-support/mute-support-button-click.html:
* media/modern-media-controls/mute-support/mute-support-media-api.html:
* media/modern-media-controls/mute-support/mute-support-muted.html:
* media/modern-media-controls/playback-support/playback-support-autoplay.html:
* media/modern-media-controls/playback-support/playback-support-button-click.html:
* media/modern-media-controls/playback-support/playback-support-media-api.html:
* media/modern-media-controls/remaining-time-support/remaining-time-support.html:
* media/modern-media-controls/scrubber-support/scrubber-support-click.html:
* media/modern-media-controls/scrubber-support/scrubber-support-drag.html:
* media/modern-media-controls/scrubber-support/scrubber-support-media-api.html:
* media/modern-media-controls/start-support/start-support-audio.html:
* media/modern-media-controls/start-support/start-support-autoplay.html:
* media/modern-media-controls/start-support/start-support-click-to-start.html:
* media/modern-media-controls/start-support/start-support-error.html:
* media/modern-media-controls/start-support/start-support-fullscreen.html:
* media/modern-media-controls/start-support/start-support-manual-play.html:
* media/modern-media-controls/start-support/start-support-no-source.html:
* media/modern-media-controls/volume-support/volume-support-click-expected.txt: Added.
* media/modern-media-controls/volume-support/volume-support-click.html: Added.
* media/modern-media-controls/volume-support/volume-support-drag-expected.txt: Added.
* media/modern-media-controls/volume-support/volume-support-drag.html: Added.
* media/modern-media-controls/volume-support/volume-support-media-api-expected.txt: Added.
* media/modern-media-controls/volume-support/volume-support-media-api-mute-expected.txt: Added.
* media/modern-media-controls/volume-support/volume-support-media-api-mute.html: Added.
* media/modern-media-controls/volume-support/volume-support-media-api.html: Added.
* platform/ios-simulator/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html
LayoutTests/media/modern-media-controls/elapsed-time-support/elapsed-time-support.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-constructor.html
LayoutTests/media/modern-media-controls/media-controller/media-controller-resize.html
LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click.html
LayoutTests/media/modern-media-controls/mute-support/mute-support-media-api.html
LayoutTests/media/modern-media-controls/mute-support/mute-support-muted.html
LayoutTests/media/modern-media-controls/playback-support/playback-support-autoplay.html
LayoutTests/media/modern-media-controls/playback-support/playback-support-button-click.html
LayoutTests/media/modern-media-controls/playback-support/playback-support-media-api.html
LayoutTests/media/modern-media-controls/remaining-time-support/remaining-time-support.html
LayoutTests/media/modern-media-controls/scrubber-support/scrubber-support-click.html
LayoutTests/media/modern-media-controls/scrubber-support/scrubber-support-drag.html
LayoutTests/media/modern-media-controls/scrubber-support/scrubber-support-media-api.html
LayoutTests/media/modern-media-controls/start-support/start-support-audio.html
LayoutTests/media/modern-media-controls/start-support/start-support-autoplay.html
LayoutTests/media/modern-media-controls/start-support/start-support-click-to-start.html
LayoutTests/media/modern-media-controls/start-support/start-support-error.html
LayoutTests/media/modern-media-controls/start-support/start-support-fullscreen.html
LayoutTests/media/modern-media-controls/start-support/start-support-manual-play.html
LayoutTests/media/modern-media-controls/start-support/start-support-no-source.html
LayoutTests/media/modern-media-controls/volume-support/volume-support-click-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/volume-support/volume-support-click.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/volume-support/volume-support-drag-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/volume-support/volume-support-drag.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api-mute-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api-mute.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/modern-media-controls/js-files
Source/WebCore/Modules/modern-media-controls/media/media-controller.js
Source/WebCore/Modules/modern-media-controls/media/volume-support.js [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj