Changeset 183782 in webkit


Ignore:
Timestamp:
May 4, 2015 5:08:28 PM (9 years ago)
Author:
eric.carlson@apple.com
Message:

[Mac] Audio-only files should not have a device picker
https://bugs.webkit.org/show_bug.cgi?id=144606
<rdar://problem/20806387>

Reviewed by Dean Jackson.

  • Modules/mediacontrols/mediaControlsApple.js:

(Controller.prototype.hasVideo): New.
(Controller.prototype.updateFullscreenButtons): Use hasVideo.
(Controller.prototype.updateHasVideo): Ditto.
(Controller.prototype.updateWirelessTargetAvailable): Don't show the target picker button
unless a file has video.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r183781 r183782  
     12015-05-04  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Mac] Audio-only files should not have a device picker
     4        https://bugs.webkit.org/show_bug.cgi?id=144606
     5        <rdar://problem/20806387>
     6
     7        Reviewed by Dean Jackson.
     8
     9        * Modules/mediacontrols/mediaControlsApple.js:
     10        (Controller.prototype.hasVideo): New.
     11        (Controller.prototype.updateFullscreenButtons): Use hasVideo.
     12        (Controller.prototype.updateHasVideo): Ditto.
     13        (Controller.prototype.updateWirelessTargetAvailable): Don't show the target picker button
     14        unless a file has video.
     15
    1162015-05-04  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js

    r183751 r183782  
    987987    },
    988988
     989    hasVideo: function()
     990    {
     991        return this.video.videoTracks && this.video.videoTracks.length;
     992    },
     993
    989994    updateFullscreenButtons: function()
    990995    {
    991         var hasVisualMedia = this.video.videoTracks && this.video.videoTracks.length > 0;
    992         var shouldBeHidden = !this.video.webkitSupportsFullscreen || !hasVisualMedia;
     996        var shouldBeHidden = !this.video.webkitSupportsFullscreen || !this.hasVideo();
    993997        this.controls.fullscreenButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden);
    994998        this.controls.optimizedFullscreenButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden);
     
    17261730    updateHasVideo: function()
    17271731    {
    1728         if (this.video.videoTracks.length)
     1732        if (this.hasVideo())
    17291733            this.controls.panel.classList.remove(this.ClassNames.noVideo);
    17301734        else
     
    18391843            wirelessPlaybackTargetsAvailable = false;
    18401844
    1841         if (wirelessPlaybackTargetsAvailable && this.isPlayable())
     1845        if (wirelessPlaybackTargetsAvailable && this.isPlayable() && this.hasVideo())
    18421846            this.controls.wirelessTargetPicker.classList.remove(this.ClassNames.hidden);
    18431847        else
Note: See TracChangeset for help on using the changeset viewer.