Bug 129723

Summary: [iOS] Show external device name/type in placeholder
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, cdumez, commit-queue, esprehn+autocc, glenn, gyuyoung.kim, jer.noble, kondapallykalyan, philipj, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch.
none
Out damned space! jer.noble: review+

Description Eric Carlson 2014-03-04 18:39:45 PST
Show the external device type and name in the <video> placeholder image.
Comment 1 Eric Carlson 2014-03-04 18:39:57 PST
<rdar://problem/16100149>
Comment 2 Eric Carlson 2014-03-04 18:52:27 PST
Created attachment 225840 [details]
Proposed patch.
Comment 3 WebKit Commit Bot 2014-03-04 18:55:05 PST
Attachment 225840 [details] did not pass style-queue:


ERROR: Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp:179:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
ERROR: Source/WebCore/html/HTMLMediaSession.cpp:203:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 2 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Eric Carlson 2014-03-04 20:22:31 PST
The elf build error doesn't have anything to do with this patch:

Last 500 characters of output:
ct Source/WebCore/CMakeFiles/WebCore.dir/__/__/DerivedSources/WebCore/JSAudioContext.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
Comment 5 Eric Carlson 2014-03-04 20:34:01 PST
Created attachment 225848 [details]
Out damned space!
Comment 6 Jer Noble 2014-03-05 08:45:04 PST
Comment on attachment 225848 [details]
Out damned space!

View in context: https://bugs.webkit.org/attachment.cgi?id=225848&action=review

r=me, with nit.

> Source/WebCore/html/HTMLMediaSession.cpp:217
> +String HTMLMediaSession::wirelessPlaybackTargetDisplayName(const HTMLMediaElement& element) const
> +{
> +    MediaPlayer* player = element.player();
> +    if (!player) {
> +        LOG(Media, "HTMLMediaSession::currentPlaybackTargetDisplayName - returning \"\" because player is NULL");
> +        return emptyString();
> +    }
> +    
> +    String name = player->wirelessPlaybackTargetName();
> +    LOG(Media, "HTMLMediaSession::currentPlaybackTargetDisplayName - returning \"%s\"", name.utf8().data());
> +    
> +    return name;
> +}
> +
> +MediaPlayer::WirelessPlaybackTargetType HTMLMediaSession::wirelessPlaybackTargetType(const HTMLMediaElement& element) const
> +{
> +    MediaPlayer* player = element.player();
> +    if (!player) {
> +        LOG(Media, "HTMLMediaSession::wirelessPlaybackTargetType - returning 0 because player is NULL");
> +        return MediaPlayer::TargetTypeNone;
> +    }
> +    
> +    MediaPlayer::WirelessPlaybackTargetType type = player->wirelessPlaybackTargetType();
> +    LOG(Media, "HTMLMediaSession::currentPlaybackTargetDisplayName - returning %i", static_cast<int>(type));
> +    
> +    return type;
> +}
> +    

Why is this being routed through HTMLMediaSession?  It seems like this could either go into the MediaControlsHost or HTMLMediaElement.
Comment 7 Eric Carlson 2014-03-05 13:35:10 PST
Committed r165125: https://trac.webkit.org/r165125