Title: [182274] trunk/Source/WebCore
Revision
182274
Author
eric.carl...@apple.com
Date
2015-04-02 10:15:48 -0700 (Thu, 02 Apr 2015)

Log Message

[iOS] Fix AirPlay problem caused by r182240
https://bugs.webkit.org/show_bug.cgi?id=143337

Reviewed by Jer Noble.

* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Return false if the legacy attribute
    "x-webkit-airplay" has the value "allow".
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::parseAttribute): Don't call webkitWirelessVideoPlaybackDisabled when
    processing "x-webkit-airplay" and "x-webkit-wirelessvideoplaybackdisabled", just consider
    the attribute/value.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (182273 => 182274)


--- trunk/Source/WebCore/ChangeLog	2015-04-02 16:44:37 UTC (rev 182273)
+++ trunk/Source/WebCore/ChangeLog	2015-04-02 17:15:48 UTC (rev 182274)
@@ -1,3 +1,18 @@
+2015-04-02  Eric Carlson  <eric.carl...@apple.com>
+
+        [iOS] Fix AirPlay problem caused by r182240
+        https://bugs.webkit.org/show_bug.cgi?id=143337
+
+        Reviewed by Jer Noble.
+
+        * html/HTMLMediaSession.cpp:
+        (WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Return false if the legacy attribute
+            "x-webkit-airplay" has the value "allow".
+        * html/HTMLVideoElement.cpp:
+        (WebCore::HTMLVideoElement::parseAttribute): Don't call webkitWirelessVideoPlaybackDisabled when
+            processing "x-webkit-airplay" and "x-webkit-wirelessvideoplaybackdisabled", just consider
+            the attribute/value.
+
 2015-04-02  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r182265.

Modified: trunk/Source/WebCore/html/HTMLMediaSession.cpp (182273 => 182274)


--- trunk/Source/WebCore/html/HTMLMediaSession.cpp	2015-04-02 16:44:37 UTC (rev 182273)
+++ trunk/Source/WebCore/html/HTMLMediaSession.cpp	2015-04-02 17:15:48 UTC (rev 182274)
@@ -241,6 +241,10 @@
         LOG(Media, "HTMLMediaSession::wirelessVideoPlaybackDisabled - returning TRUE because of legacy attribute");
         return true;
     }
+    if (equalIgnoringCase(legacyAirplayAttributeValue, "allow")) {
+        LOG(Media, "HTMLMediaSession::wirelessVideoPlaybackDisabled - returning FALSE because of legacy attribute");
+        return false;
+    }
 #endif
 
     MediaPlayer* player = element.player();

Modified: trunk/Source/WebCore/html/HTMLVideoElement.cpp (182273 => 182274)


--- trunk/Source/WebCore/html/HTMLVideoElement.cpp	2015-04-02 16:44:37 UTC (rev 182273)
+++ trunk/Source/WebCore/html/HTMLVideoElement.cpp	2015-04-02 17:15:48 UTC (rev 182274)
@@ -122,14 +122,18 @@
     }
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
     else if (name == webkitwirelessvideoplaybackdisabledAttr)
-        mediaSession().setWirelessVideoPlaybackDisabled(*this, webkitWirelessVideoPlaybackDisabled());
+        mediaSession().setWirelessVideoPlaybackDisabled(*this, true);
 #endif
     else {
         HTMLMediaElement::parseAttribute(name, value);    
 
 #if PLATFORM(IOS) && ENABLE(WIRELESS_PLAYBACK_TARGET)
-        if (name == webkitairplayAttr)
-            mediaSession().setWirelessVideoPlaybackDisabled(*this, webkitWirelessVideoPlaybackDisabled());
+        if (name == webkitairplayAttr) {
+            bool disabled = false;
+            if (equalIgnoringCase(fastGetAttribute(HTMLNames::webkitairplayAttr), "deny"))
+                disabled = true;
+            mediaSession().setWirelessVideoPlaybackDisabled(*this, disabled);
+        }
 #endif
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to