Bug 157173

Summary: webkitShowPlaybackTargetPicker does not show available devices on iPhones
Product: WebKit Reporter: Rick Smit <rick>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: eric.carlson, jonlee, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 9   
Hardware: iPhone / iPad   
OS: iOS 9.3   
URL: https://jsfiddle.net/8gd83urs/embedded/result

Description Rick Smit 2016-04-29 03:36:26 PDT
On Safari in iOS, the webkitplaybacktargetavailabilitychanged fires, but when I call the webkitShowPlaybackTargetPicker it opens the dialog, but it doesn't show my Apple TV. I'm having the same issue in my WKWebView app.

Steps to reproduce:
1) Access this example page: https://jsfiddle.net/8gd83urs/embedded/result from your iOS device on the same network as your Apple TV.
2) Click the custom Airplay control button

Actual result:
The TargetPicker Dialog opens, but it doesn't show available devices.

Expected result:
That the TargetPicker Dialog shows the available devices and lets me stream video content to them.

Build Date & Platform:
Safari in iOS: WebKit version 601.1.46
WKWebView in IOS: WebKit version 601.1.46
Comment 1 Jon Lee 2016-04-29 09:37:56 PDT
We are not in control of the items in the popover. Is your AppleTV available in the AirPlay picker when you bring up Control Center?

Based on your WebKit version I'm guessing that's iOS 9?
Comment 2 Rick Smit 2016-04-29 10:20:31 PDT
Hi Jon, thanks for your reply.

I can see my Apple TV in the control center and I'm on iOS 9 yes.
Is it maybe disabled for WKWebView and therefore not a bug? I came across this commit where it looks like it's still a work in progress: https://github.com/WebKit/webkit/commit/c6ef2c91f6dee37eee0c65c755daf4aa20f4b1e1#diff-d3dfe0e4202ffdbbf57f4ce53ee922b6

(In reply to comment #1)
> We are not in control of the items in the popover. Is your AppleTV available
> in the AirPlay picker when you bring up Control Center?
> 
> Based on your WebKit version I'm guessing that's iOS 9?
Comment 3 Jon Lee 2016-04-29 16:29:15 PDT
Is this happening to you on iPhone only?
Comment 4 Radar WebKit Bug Importer 2016-04-29 16:47:14 PDT
<rdar://problem/26017691>
Comment 5 Rick Smit 2016-05-02 01:18:05 PDT
I was unable to test this on iPad, but I've tested it Mac OS (El Capitan) Safari 9 and there it works.

Will update the issue when I've tested this on an iPad as well.

Thanks
Comment 6 Rick Smit 2016-05-04 00:56:27 PDT
Hi John, tested it on iPad as well now, and to my surprise it also works on my iPad running iOS 9.4.3. Hope it helps!

Thanks
Comment 7 Eric Carlson 2016-06-30 08:41:47 PDT
This was fixed by the changes for 159161. Forwarding duping to that bug.

*** This bug has been marked as a duplicate of bug 159161 ***