linterna-magica-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linterna-magica-commit] [260] Merging r259 from trunk to branch 0.0.11:


From: Ivaylo Valkov
Subject: [linterna-magica-commit] [260] Merging r259 from trunk to branch 0.0.11: Fixes displacement in YouTube when their HTML5 player complains about missing support for video formats in the browser
Date: Sun, 26 Feb 2012 08:39:31 +0000

Revision: 260
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=260
Author:   valkov
Date:     2012-02-26 08:39:31 +0000 (Sun, 26 Feb 2012)
Log Message:
-----------
Merging r259 from trunk to branch 0.0.11: Fixes displacement in YouTube when 
their HTML5 player complains about missing support for video formats in the 
browser

Revision Links:
--------------
    http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=259

Modified Paths:
--------------
    branches/0.0.11/src/lm_site_youtube.js

Property Changed:
----------------
    branches/0.0.11/


Property changes on: branches/0.0.11
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/0.0.9:94
/branches/task-11216:102-156
   + /branches/0.0.9:94
/branches/task-11216:102-156
/trunk:259

Modified: branches/0.0.11/src/lm_site_youtube.js
===================================================================
--- branches/0.0.11/src/lm_site_youtube.js      2012-02-26 08:35:11 UTC (rev 
259)
+++ branches/0.0.11/src/lm_site_youtube.js      2012-02-26 08:39:31 UTC (rev 
260)
@@ -529,5 +529,28 @@
        }
     }
 
+    // When YouTube's HTML5 player detects that the browser does not
+    // have support for any clip, a warning div is displayed. It must
+    // be hidden or it displaces Linterna Magica.
+
+    // The <video/> element is missing because of the
+    // error. this.find_site_html5_wrapper() will not
+    // work. Implementing custom_html5_player_finder() is not so good
+    // idea.
+    var html5_wrapper = document.getElementById("movie_player-html5");
+
+    if (html5_wrapper)
+    {
+       var html5_warning = html5_wrapper.querySelector(".video-fallback");
+
+       if (html5_warning &&
+           !/none/i.test(html5_warning.style.getPropertyValue('display')))
+       {
+           // Must hide the entire HTML5 wrapper, so Linterna Magica
+           // will not be displaced.
+           html5_wrapper.style.setProperty('display', "none", "important");
+       }
+    }
+
     return false;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]