[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linterna-magica-commit] [259] Fixes displacement in YouTube when their
From: |
Ivaylo Valkov |
Subject: |
[linterna-magica-commit] [259] Fixes displacement in YouTube when their HTML5 player complains about missing support for video formats in the browser |
Date: |
Sun, 26 Feb 2012 08:35:12 +0000 |
Revision: 259
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=259
Author: valkov
Date: 2012-02-26 08:35:11 +0000 (Sun, 26 Feb 2012)
Log Message:
-----------
Fixes displacement in YouTube when their HTML5 player complains about missing
support for video formats in the browser
Modified Paths:
--------------
trunk/src/lm_site_youtube.js
Modified: trunk/src/lm_site_youtube.js
===================================================================
--- trunk/src/lm_site_youtube.js 2012-02-19 16:47:14 UTC (rev 258)
+++ trunk/src/lm_site_youtube.js 2012-02-26 08:35:11 UTC (rev 259)
@@ -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;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [linterna-magica-commit] [259] Fixes displacement in YouTube when their HTML5 player complains about missing support for video formats in the browser,
Ivaylo Valkov <=