⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 266312 in webkit


Ignore:
Timestamp:
Aug 28, 2020, 4:21:37 PM (6 years ago)
Author:
eric.carlson@apple.com
Message:

[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.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r266311 r266312  
     12020-08-28  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [macOS] AirPlay device name is wrong when playing to multiple devices
     4        https://bugs.webkit.org/show_bug.cgi?id=215952
     5        <rdar://problem/66930799>
     6
     7        Reviewed by Jer Noble.
     8
     9        Tested manually because this requires a specific hardware setup.
     10
     11        * platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm:
     12        (WebCore::MediaPlaybackTargetCocoa::deviceName const): If the AVOutputContext
     13        supports multiple output devices, create the device name by concatenating the names
     14        of all of the active output devices.
     15
    1162020-08-28  Sam Weinig  <weinig@apple.com>
    217
  • trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h

    r265115 r266312  
    9999@interface AVOutputDevice : NSObject
    100100@property (nonatomic, readonly) NSString *name;
     101@property (nonatomic, readonly) NSString *deviceName;
    101102@property (nonatomic, readonly) AVOutputDeviceFeatures deviceFeatures;
    102103@end
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm

    r259303 r266312  
    110110String MediaPlaybackTargetCocoa::deviceName() const
    111111{
    112     if (m_outputContext)
    113         return m_outputContext.get().deviceName;
     112    if (!m_outputContext)
     113        return emptyString();
    114114
    115     return emptyString();
     115    if (![m_outputContext supportsMultipleOutputDevices])
     116        return [m_outputContext deviceName];
     117
     118    auto outputDeviceNames = adoptNS([[NSMutableArray alloc] init]);
     119    for (AVOutputDevice *outputDevice in [m_outputContext outputDevices])
     120        [outputDeviceNames addObject:[outputDevice deviceName]];
     121
     122    return [outputDeviceNames componentsJoinedByString:@" + "];
    116123}
    117124
Note: See TracChangeset for help on using the changeset viewer.