Title: [171944] trunk/Source/WebCore
Revision
171944
Author
[email protected]
Date
2014-08-01 12:42:06 -0700 (Fri, 01 Aug 2014)

Log Message

[Media iOS] Ensure there is a nice default fallback for missing wireless target names
https://bugs.webkit.org/show_bug.cgi?id=135488
<rdar://problem/17879156>

Reviewed by Eric Carlson.

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 "Apple TV".

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updateWirelessPlaybackStatus): Check if the externalDeviceDisplayName
is empty or null, and fall back to "Apple TV" if so.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (171943 => 171944)


--- trunk/Source/WebCore/ChangeLog	2014-08-01 19:19:22 UTC (rev 171943)
+++ trunk/Source/WebCore/ChangeLog	2014-08-01 19:42:06 UTC (rev 171944)
@@ -1,3 +1,21 @@
+2014-07-31  Dean Jackson  <[email protected]>
+
+        [Media iOS] Ensure there is a nice default fallback for missing wireless target names
+        https://bugs.webkit.org/show_bug.cgi?id=135488
+        <rdar://problem/17879156>
+
+        Reviewed by Eric Carlson.
+
+        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 "Apple TV".
+
+        * Modules/mediacontrols/mediaControlsiOS.js:
+        (ControllerIOS.prototype.updateWirelessPlaybackStatus): Check if the externalDeviceDisplayName
+        is empty or null, and fall back to "Apple TV" if so.
+
 2014-07-30  Myles C. Maxfield  <[email protected]>
 
         URLs in srcset attributes are not made absolute upon copy and paste

Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js (171943 => 171944)


--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js	2014-08-01 19:19:22 UTC (rev 171943)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js	2014-08-01 19:42:06 UTC (rev 171944)
@@ -110,13 +110,16 @@
             var deviceType = "";
             var type = this.host.externalDeviceType;
             if (type == "airplay") {
+                var externalDeviceDisplayName = this.host.externalDeviceDisplayName;
+                if (!externalDeviceDisplayName || externalDeviceDisplayName == "")
+                    externalDeviceDisplayName = "Apple TV";
                 deviceType = this.UIString('##WIRELESS_PLAYBACK_DEVICE_TYPE##');
-                deviceName = this.UIString('##WIRELESS_PLAYBACK_DEVICE_NAME##', '##DEVICE_NAME##', this.host.externalDeviceDisplayName);
+                deviceName = this.UIString('##WIRELESS_PLAYBACK_DEVICE_NAME##', '##DEVICE_NAME##', externalDeviceDisplayName);
             } else if (type == "tvout") {
                 deviceType = this.UIString('##TVOUT_DEVICE_TYPE##');
                 deviceName = this.UIString('##TVOUT_DEVICE_NAME##');
             }
-            
+
             backgroundImageSVG = backgroundImageSVG.replace('##DEVICE_TYPE##', deviceType);
             backgroundImageSVG = backgroundImageSVG.replace('##DEVICE_NAME##', deviceName);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to