Bug 129723 - [iOS] Show external device name/type in placeholder
Summary: [iOS] Show external device name/type in placeholder
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-04 18:39 PST by Eric Carlson
Modified: 2014-03-05 13:35 PST (History)
10 users (show)

See Also:


Attachments
Proposed patch. (2.05 MB, patch)
2014-03-04 18:52 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Out damned space! (2.04 MB, patch)
2014-03-04 20:34 PST, Eric Carlson
jer.noble: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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