Bug 135488 - [Media iOS] Ensure there is a nice default fallback for missing wireless target names
Summary: [Media iOS] Ensure there is a nice default fallback for missing wireless targ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-31 18:16 PDT by Dean Jackson
Modified: 2014-08-01 12:42 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.61 KB, patch)
2014-07-31 18:26 PDT, Dean Jackson
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2014-07-31 18:16:31 PDT
[Media iOS] Ensure there is a nice default fallback for missing wireless target names
Comment 1 Dean Jackson 2014-07-31 18:18:11 PDT
We occasionally run into cases where this.host.externalDeviceDisplayName is empty or null, creating a pretty ugly/confusing string in the wireless playback status screen.

If this happens, we should default to using "AppleTV"

<rdar://problem/17879156>
Comment 2 Dean Jackson 2014-07-31 18:26:28 PDT
Created attachment 235868 [details]
Patch
Comment 3 Eric Carlson 2014-07-31 21:45:00 PDT
Comment on attachment 235868 [details]
Patch

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

> Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js:113
> +                var externalDeviceDisplayName = (this.host.externalDeviceDisplayName && this.host.externalDeviceDisplayName != "") ? this.host.externalDeviceDisplayName : "AppleTV";

Nit: this would be slightly easier to understand if it was split into two separate lines:

var externalDeviceDisplayName = this.host.externalDeviceDisplayName;
If (...)
Comment 4 Dean Jackson 2014-08-01 12:42:44 PDT
Committed r171944: <http://trac.webkit.org/changeset/171944>