RESOLVED FIXED 143251
[Mac] Do not include route button if element does not support target playback
https://bugs.webkit.org/show_bug.cgi?id=143251
Summary [Mac] Do not include route button if element does not support target playback
Eric Carlson
Reported 2015-03-30 20:38:18 PDT
Not all media engines support playback to an external device.
Attachments
Proposed patch (49.11 KB, patch)
2015-03-31 13:44 PDT, Eric Carlson
no flags
Updated Patch (49.23 KB, patch)
2015-03-31 14:57 PDT, Eric Carlson
jer.noble: review+
Patch for landing (49.07 KB, patch)
2015-04-01 10:10 PDT, Eric Carlson
no flags
Radar WebKit Bug Importer
Comment 1 2015-03-31 13:38:20 PDT
Eric Carlson
Comment 2 2015-03-31 13:44:05 PDT
Created attachment 249847 [details] Proposed patch
Eric Carlson
Comment 3 2015-03-31 14:57:51 PDT
Created attachment 249856 [details] Updated Patch
Jon Lee
Comment 4 2015-03-31 19:25:28 PDT
Jer Noble
Comment 5 2015-04-01 10:00:47 PDT
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.
Eric Carlson
Comment 6 2015-04-01 10:10:20 PDT
Created attachment 249928 [details] Patch for landing
Eric Carlson
Comment 7 2015-04-01 10:11:24 PDT
(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!
Eric Carlson
Comment 8 2015-04-01 11:09:19 PDT
Eric Carlson
Comment 9 2015-04-01 12:51:40 PDT
Committed https://trac.webkit.org/r182250 to fix the iOS build.
Note You need to log in before you can comment on or make changes to this bug.