Changeset 176714 in webkit
- Timestamp:
- Dec 3, 2014, 2:09:06 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/media/audio-as-video-fullscreen-expected.txt (added)
-
LayoutTests/media/audio-as-video-fullscreen.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (modified) (4 diffs)
-
Source/WebCore/Modules/mediacontrols/mediaControlsBase.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r176712 r176714 1 2014-12-02 Dean Jackson <dino@apple.com> 2 3 [Media] Audio content shouldn't have fullscreen buttons, even if in a video element 4 https://bugs.webkit.org/show_bug.cgi?id=139200 5 <rdar://problem/18914506> 6 7 Reviewed by Eric Carlson. 8 9 Loads an audio file via the video element and checks if the 10 fullscreen button is visible. 11 12 * media/audio-as-video-fullscreen-expected.txt: Added. 13 * media/audio-as-video-fullscreen.html: Added. 14 1 15 2014-12-03 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r176713 r176714 1 2014-12-02 Dean Jackson <dino@apple.com> 2 3 [Media] Audio content shouldn't have fullscreen buttons, even if in a video element 4 https://bugs.webkit.org/show_bug.cgi?id=139200 5 <rdar://problem/18914506> 6 7 Reviewed by Eric Carlson. 8 9 An audio-only resource, even if loaded into a <video> element, should not 10 present the fullscreen or optimised fullscreen controls. This includes a 11 MediaDocument, which is always a <video> element. We can detect this by 12 examining the length of the videoTracks property as our content loads. 13 14 Test: media/audio-as-video-fullscreen.html 15 16 * Modules/mediacontrols/mediaControlsApple.js: 17 (Controller): Initialize a hasVisualMedia to false. 18 (Controller.prototype.handleReadyStateChange): If we see a videoTrack, hasVisualMedia is now true. 19 (Controller.prototype.updateFullscreenButtons): Merge the updateFullscreenButton and 20 updateOptimizedFullscreenButton methods into this single spot, and check for 21 hasVisualMedia. 22 (Controller.prototype.updateFullscreenButton): Deleted. 23 (Controller.prototype.updateOptimizedFullscreenButton): Deleted. 24 25 * Modules/mediacontrols/mediaControlsBase.js: Do the same for the other ports. 26 1 27 2014-12-02 Dean Jackson <dino@apple.com> 2 28 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
r176139 r176714 13 13 this.isLive = false; 14 14 this.statusHidden = true; 15 this.hasVisualMedia = false; 15 16 16 17 this.addVideoListeners(); … … 27 28 this.updateCaptionButton(); 28 29 this.updateCaptionContainer(); 29 this.updateFullscreenButton ();30 this.updateFullscreenButtons(); 30 31 this.updateVolume(); 31 32 this.updateHasAudio(); … … 555 556 handleReadyStateChange: function(event) 556 557 { 558 this.hasVisualMedia = this.video.videoTracks && this.video.videoTracks.length > 0; 557 559 this.updateReadyState(); 558 560 this.updateDuration(); 559 561 this.updateCaptionButton(); 560 562 this.updateCaptionContainer(); 561 this.updateFullscreenButton(); 562 this.updateOptimizedFullscreenButton(); 563 this.updateFullscreenButtons(); 563 564 this.updateProgress(); 564 565 }, … … 861 862 }, 862 863 863 updateFullscreenButton: function() 864 { 865 this.controls.fullscreenButton.classList.toggle(this.ClassNames.hidden, !this.video.webkitSupportsFullscreen); 866 }, 867 868 updateOptimizedFullscreenButton: function() 869 { 870 this.controls.optimizedFullscreenButton.classList.toggle(this.ClassNames.hidden, !this.video.webkitSupportsFullscreen); 871 }, 872 864 updateFullscreenButtons: function() 865 { 866 var shouldBeHidden = !this.video.webkitSupportsFullscreen || !this.hasVisualMedia; 867 this.controls.fullscreenButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden); 868 this.controls.optimizedFullscreenButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden); 869 }, 870 873 871 handleFullscreenButtonClicked: function(event) 874 872 { -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js
r175477 r176714 13 13 this.isLive = false; 14 14 this.statusHidden = true; 15 this.hasVisualMedia = false; 15 16 16 17 this.addVideoListeners(); … … 555 556 handleReadyStateChange: function(event) 556 557 { 558 this.hasVisualMedia = this.video.videoTracks && this.video.videoTracks.length > 0; 557 559 this.updateReadyState(); 558 560 this.updateDuration(); … … 837 839 updateFullscreenButton: function() 838 840 { 839 this.controls.fullscreenButton.classList.toggle(this.ClassNames.hidden, !this.video.webkitSupportsFullscreen);841 this.controls.fullscreenButton.classList.toggle(this.ClassNames.hidden, (!this.video.webkitSupportsFullscreen || !this.hasVisualMedia)); 840 842 }, 841 843
Note:
See TracChangeset
for help on using the changeset viewer.