For using Kaltura.com's HTML5 flavours for iPad / iPhone support, the following script has to be placed in the head of the page.tpl.php: <script type="text/javascript" src="http://html5.kaltura.org/js">. But:
"mwEmbed" requires jQuery 1.4 or above. The problem is that Drupals jquery update module supports only 1.3.x at the moment (see iQuery Udate issue: http://drupal.org/node/685060). Is there a workaround for this issue without modifying the drupal core? We tried by inserting the following code only in the node-contenttype(video).tpl.php:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript">var $jq =jQuery.noConflict();</script>
This makes the html5 flavours work without killing other AJAX based Drupal-Modules using jquery 1.3 (what was the result of the page.tpl-php-version).
This doesn't seem to be an elegant way, because of:
1.) both jquery versions are loaded
2.) if the video-content-type would be updated by another cck field (for example an image gallery using jquery 1.3, p.e. Galleria (http://drupal.org/project/galleria) it won't work.
Is there a workaround for this? Could be "mwEmbed" loaded seperarely from jquery1.4 without creating conflicts with jQ1.3-modules?
Comments
Comment #1
patrickroma commentedHTML5 support now works (We tested on Kaltura Hosted Edition, with HTML5 flavours activated)...
You just need to put
into the head of your page.tpl.php (just above the body tag and behind all other javascript). The HTML5 falls back to an iFrame- therefore no conflict with jquery 1.4 is given anymore.
Comment #2
vinmassaro commentedIs there a way this can happen within the module instead of at the theme layer? We maintain an environment with many different sites/themes and would rather it be handled natively without needing to add this code to each theme if a user wants to use Kaltura.
Comment #3
patrickroma commentedThis would Be nice indeed. But I am Not sure if this is the Final implementation of the iFrame html5 fallback?
Comment #4
Zohar.Babin commentedYes, this is still in development at http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library
However, if you'd like to add it to your module, it is pretty easy using the Drupal APIs.
Add the following to a new module or into the Kaltura module in the init function of the module:
The above two lines should add the needed JS to all pages when the module is active.
edit:
Just realized 'external' was only introduced for Drupal 7. #91250: JavaScript Patch #4: External Scripts
oh well, you can always download the HTML5 library from the project page (above) and host it in your module lib...
Comment #5
gambaweb commentedIf you want to add external js to the head section you can use drupal_set_html_head
and closinghttp://api.drupal.org/api/drupal/includes--common.inc/function/drupal_se...
make sure to add the opening
Comment #6
vinmassaro commentedIt would be good to have this as a part of the module instead of having to add it directly to the theme, or via a custom module.
Comment #7
patrickroma commentedFor using Kaltura.com's HTML5 flavours, the following script has to be placed in the head of the page.tpl.php:
<script type="text/javascript" src="http://html5.kaltura.org/js">But this makes it difficult for Kalturas html5 script to override the "swfObject.js" object for mobile devices. You can fix this problem by adding the
HTML5 script tag to come after the swfObject.js.
In Drupal 6 you can download the HTML5 library from the project page and host it in your module lib. Add the
following to a new module or into the Kaltura module in the init function "kaltura_init()" of the module:
Example:
=> http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ad...