| Summary: | [Mac] Do not include route button if element does not support target playback | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Carlson <eric.carlson> | ||||||||
| Component: | Media | Assignee: | Eric Carlson <eric.carlson> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | jer.noble, jonlee, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Eric Carlson
2015-03-30 20:38:18 PDT
Created attachment 249847 [details]
Proposed patch
Created attachment 249856 [details]
Updated Patch
Comment on attachment 249856 [details] Updated Patch r=me, with nits. View in context: https://bugs.webkit.org/attachment.cgi?id=249856&action=review > Source/WebCore/Modules/mediacontrols/mediaControlsApple.js:1702 > + if (!'webkitCurrentPlaybackTargetIsWireless' in this.video || !'webkitWirelessVideoPlaybackDisabled' in this.video) > + return false; It seems like these are unnecessary. > Source/WebCore/Modules/mediacontrols/mediaControlsApple.js:1753 > + if ('webkitWirelessVideoPlaybackDisabled' in this.video && this.video.webkitWirelessVideoPlaybackDisabled) ditto the 'in this.video'. > Source/WebCore/platform/graphics/MediaPlaybackTarget.h:57 > + void setDevicePickerContext(AVOutputContext *) { } > + AVOutputContext *devicePickerContext() const { return nullptr; } > + bool hasActiveRoute() const { return false; } It seems unfortunate to expose AVOutputContext to non-Cocoa clients. Maybe in a follow-up we can come up with a "PlatformOutputContext" which wraps AVOutputContext in Cocoa, but not for all other ports. Created attachment 249928 [details]
Patch for landing
(In reply to comment #5) > Comment on attachment 249856 [details] > Updated Patch > > r=me, with nits. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=249856&action=review > > > Source/WebCore/Modules/mediacontrols/mediaControlsApple.js:1702 > > + if (!'webkitCurrentPlaybackTargetIsWireless' in this.video || !'webkitWirelessVideoPlaybackDisabled' in this.video) > > + return false; > > It seems like these are unnecessary. > Agreed, fixed. > > Source/WebCore/Modules/mediacontrols/mediaControlsApple.js:1753 > > + if ('webkitWirelessVideoPlaybackDisabled' in this.video && this.video.webkitWirelessVideoPlaybackDisabled) > > ditto the 'in this.video'. > Ditto. > > Source/WebCore/platform/graphics/MediaPlaybackTarget.h:57 > > + void setDevicePickerContext(AVOutputContext *) { } > > + AVOutputContext *devicePickerContext() const { return nullptr; } > > + bool hasActiveRoute() const { return false; } > > It seems unfortunate to expose AVOutputContext to non-Cocoa clients. Maybe > in a follow-up we can come up with a "PlatformOutputContext" which wraps > AVOutputContext in Cocoa, but not for all other ports. > Good point, I will do that in a followup. Thanks! committed r182240: https://trac.webkit.org/r182240 Committed https://trac.webkit.org/r182250 to fix the iOS build. |