Title: [267671] branches/safari-610-branch/Source/WebCore
Revision
267671
Author
[email protected]
Date
2020-09-27 13:00:05 -0700 (Sun, 27 Sep 2020)

Log Message

Cherry-pick r266312. rdar://problem/69594218

    [macOS] AirPlay device name is wrong when playing to multiple devices
    https://bugs.webkit.org/show_bug.cgi?id=215952
    <rdar://problem/66930799>

    Reviewed by Jer Noble.

    Tested manually because this requires a specific hardware setup.

    * platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm:
    (WebCore::MediaPlaybackTargetCocoa::deviceName const): If the AVOutputContext
    supports multiple output devices, create the device name by concatenating the names
    of all of the active output devices.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266312 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-610-branch/Source/WebCore/ChangeLog (267670 => 267671)


--- branches/safari-610-branch/Source/WebCore/ChangeLog	2020-09-27 20:00:02 UTC (rev 267670)
+++ branches/safari-610-branch/Source/WebCore/ChangeLog	2020-09-27 20:00:05 UTC (rev 267671)
@@ -1,3 +1,38 @@
+2020-09-27  Alan Coon  <[email protected]>
+
+        Cherry-pick r266312. rdar://problem/69594218
+
+    [macOS] AirPlay device name is wrong when playing to multiple devices
+    https://bugs.webkit.org/show_bug.cgi?id=215952
+    <rdar://problem/66930799>
+    
+    Reviewed by Jer Noble.
+    
+    Tested manually because this requires a specific hardware setup.
+    
+    * platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm:
+    (WebCore::MediaPlaybackTargetCocoa::deviceName const): If the AVOutputContext
+    supports multiple output devices, create the device name by concatenating the names
+    of all of the active output devices.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-08-28  Eric Carlson  <[email protected]>
+
+            [macOS] AirPlay device name is wrong when playing to multiple devices
+            https://bugs.webkit.org/show_bug.cgi?id=215952
+            <rdar://problem/66930799>
+
+            Reviewed by Jer Noble.
+
+            Tested manually because this requires a specific hardware setup.
+
+            * platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm:
+            (WebCore::MediaPlaybackTargetCocoa::deviceName const): If the AVOutputContext
+            supports multiple output devices, create the device name by concatenating the names
+            of all of the active output devices.
+
 2020-09-25  Alan Coon  <[email protected]>
 
         Cherry-pick r267067. rdar://problem/69586680

Modified: branches/safari-610-branch/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h (267670 => 267671)


--- branches/safari-610-branch/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h	2020-09-27 20:00:02 UTC (rev 267670)
+++ branches/safari-610-branch/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h	2020-09-27 20:00:05 UTC (rev 267671)
@@ -104,6 +104,7 @@
 
 @interface AVOutputDevice : NSObject
 @property (nonatomic, readonly) NSString *name;
+@property (nonatomic, readonly) NSString *deviceName;
 @property (nonatomic, readonly) AVOutputDeviceFeatures deviceFeatures;
 @end
 

Modified: branches/safari-610-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm (267670 => 267671)


--- branches/safari-610-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm	2020-09-27 20:00:02 UTC (rev 267670)
+++ branches/safari-610-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm	2020-09-27 20:00:05 UTC (rev 267671)
@@ -109,10 +109,17 @@
 
 String MediaPlaybackTargetCocoa::deviceName() const
 {
-    if (m_outputContext)
-        return m_outputContext.get().deviceName;
+    if (!m_outputContext)
+        return emptyString();
 
-    return emptyString();
+    if (![m_outputContext supportsMultipleOutputDevices])
+        return [m_outputContext deviceName];
+
+    auto outputDeviceNames = adoptNS([[NSMutableArray alloc] init]);
+    for (AVOutputDevice *outputDevice in [m_outputContext outputDevices])
+        [outputDeviceNames addObject:[outputDevice deviceName]];
+
+    return [outputDeviceNames componentsJoinedByString:@" + "];
 }
 
 MediaPlaybackTargetCocoa* toMediaPlaybackTargetCocoa(MediaPlaybackTarget* rep)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to