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

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

[linterna-magica-commit] [55] Work-around for fullscreen and Vimeo with


From: Ivaylo Valkov
Subject: [linterna-magica-commit] [55] Work-around for fullscreen and Vimeo with totemNarrowSpace plugin ( QuickTime/mp4 clips).
Date: Mon, 02 May 2011 12:53:44 +0000

Revision: 55
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=55
Author:   valkov
Date:     2011-05-02 12:53:44 +0000 (Mon, 02 May 2011)
Log Message:
-----------
Work-around for fullscreen and Vimeo with totemNarrowSpace plugin 
(QuickTime/mp4 clips).

Modified Paths:
--------------
    trunk/src/lm_create_video_object.js
    trunk/src/lm_xhr.js

Modified: trunk/src/lm_create_video_object.js
===================================================================
--- trunk/src/lm_create_video_object.js 2011-05-02 10:16:38 UTC (rev 54)
+++ trunk/src/lm_create_video_object.js 2011-05-02 12:53:44 UTC (rev 55)
@@ -234,6 +234,24 @@
     if (object_data.link)
     {
        var mime = object_data.mime ? object_data.mime : "video/flv";
+
+       // Fix for video/mp4 (and other QuickTime clips) for
+       // totemNarrowSpace plugin. Fixes these issues of
+       // totemNarrowSpace plugin:
+       // - No API for fullscreen. 
+       // - The UA it sends is different from the browser, Vimeo does
+       // not load.
+       // With video/flv totemCone plugin will load.
+       if (/mp4|m4v|quicktime/i)
+       {
+           var mp4 = navigator.mimeTypes["video/mp4"];
+           if (mp4 && mp4.enabledPlugin && mp4.enabledPlugin.name &&
+               /totem/i.test(mp4.enabledPlugin.description))
+           {
+               mime = "video/flv";
+           }
+       }
+
        object_tag.setAttribute("type", mime);
        object_tag.setAttribute("data", object_data.link);
     }

Modified: trunk/src/lm_xhr.js
===================================================================
--- trunk/src/lm_xhr.js 2011-05-02 10:16:38 UTC (rev 54)
+++ trunk/src/lm_xhr.js 2011-05-02 12:53:44 UTC (rev 55)
@@ -254,10 +254,15 @@
                hd_links.unshift(hd_link);
            }
 
-           // Explicitly force video/flv. We depend on this with
-           // Totem. This way the plugin uses the user-agent of the
-           // browser.
-           mime = "video/flv";
+           // Vimeo web server sends the clips as
+           // video/mp4. totemNarrowSpace plugin (plays video/mp4)
+           // sends custom UA. This prevents the video to load. Must
+           // use video/flv, so totemCone plugin could start and send
+           // UA of the browser.  totemNarrowSpace/QuickTime plugin
+           // have other issues as well. Could be forced to
+           // video/flv, but there is a better fix in
+           // create_video_object();
+           mime = "video/mp4";
        }
 
        if (/4videosharing\.com/i.test(host))




reply via email to

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