Cestfait.ch

  • Home
  • Drupal
  • PHP 5
  • Jquery
  • Web Dev
  • Sys admin
  • Logiciels libres
  • Videos
  • Divers
  • Nous contacter
  • Mon c'est fait!
Home

Drupal videojs, format video web compatible, firefox, ie, chrome

Submitted by Sir Squall on Wed, 05/04/2011 - 16:14

Yop,

Un seul module : VideoJS (HTML5 Video Player)

Petit bug rencontré, la thumbnail est OBLIGATOIRE ! sinon le fallback flash ne fonctionne pas correctement.
Dans le fichier videojs.tpl.php, ajouter le paramatre wmode pour que l'admin menu passe par dessus le lecteur:

 

<?php
/**
 * Provide the HTML output of the videojs audio player.
 */
?>
<!-- Begin VideoJS -->
<?php if (count($items) > 0): ?>
  <div class="video-js-box <? print variable_get('videojs_skin', 'default') ?>" id="<?php print $player_id; ?>">
    <!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
    <video id="<?php print $player_id; ?>-video" class="video-js" width="<?php print($width) ?>" height="<?php print($height) ?>" controls="controls" preload="auto" poster="<?php print($poster) ?>">
      <?php foreach ($items as $item): ?>
        <?php $filepath = file_create_url($item['filepath']); ?>
        <source src="<?php print($item['filepath']) ?>" type="<?php print($item['videotype']) ?>" />
      <?php endforeach; ?>
      <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
      <?php if (isset($flash_player)): ?>
        <object class="vjs-flash-fallback" width="<?php print($width) ?>" height="<?php print($height) ?>" type="application/x-shockwave-flash"
                data="http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf">
          <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf" />
          <param name="wmode" value="transparent" />
          <param name="allowfullscreen" value="true" />
          <param name="flashvars" value="config={'playlist': [ '<?php print($poster) ?>', {'url': '<?php print($flash) ?>', 'autoPlay':false, 'autoBuffering':true} ]}" />
          <embed id="flash-<?php print $player_id; ?>"
                 name="flash-<?php print $player_id; ?>"
                 src="http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf"
                 width="<?php print($width) ?>"
                 height="<?php print($height) ?>"
                 type="application/x-shockwave-flash"
                 allowscriptaccess='always'
                 allowfullscreen='true'
                 flashvars="config={'playlist': [ '<?php print($poster) ?>', {'url': '<?php print($flash) ?>', 'autoPlay':false, 'autoBuffering':true} ]}"
                 />
          <!-- Image Fallback. Typically the same as the poster image. -->
          <img src="<?php print($poster) ?>" width="<?php print($width) ?>" height="<?php print($height) ?>" alt="Poster Image"
               title="No video playback capabilities." />
        </object>
  <?php endif; //$flash_player   ?>
    </video>
  </div>
<?php endif; ?>
<!-- End VideoJS -->

Et après tous sa c'est pas fini j'ai test, différent format (ogv, webm, mpg, etc..) le seul qui fonctionne sur tous les navigateurs a l'heure actuelle c'est (mp4):

Type : Vidéo
Codec : H264 - MPEG-4 AVC (part 10) (avc1)
Résolution : 640x266
Résolution d'affichage : 640x266
Débit d'images : 24 le 24 est important, si l'on veut une compatibilité iPad

Type : Audio
Codec : MPEG AAC Audio (mp4a)
Canaux : Stéréo
Fréquence d'échantillonnage: 44100 Hz

Petite remarque, il faut désactivé le module deflate de apache, il y a quelque souci, si on l'active il ne renvoi pas les headers pour le mp4.

Have fun !

0
Log in to vote
No votes yet
  • Login or register to post comments
  • Share this
Tags:
  • Drupal

User login

  • Create new account
  • Request new password
  • Sign in with Twitter

Translate

Sondage

Qu'elle version de drupal utilisez-vous ?

Submitted by Sir Squall on Tue, 04/10/2012 - 16:30
  • Login or register to post comments

Recent comments

  • Arf, je suis à l'armée!
    40 weeks 1 day ago
  • hahaha c'est juste! Il n'y a
    46 weeks 4 days ago
  • yeah comme sa fait plaisir de
    46 weeks 6 days ago
  • wouahou merciii :-) !
    50 weeks 5 days ago
  • J'y réponds aujourd'hui ici
    50 weeks 5 days ago
  • Salut, court article mais
    50 weeks 6 days ago
  • Oktoberfest power!!!
    1 year 3 weeks ago
  • yep je vais faire un petit
    1 year 5 weeks ago
  • It's regular approuved
    1 year 5 weeks ago
  • Pas d'exemple????
    1 year 5 weeks ago

Tags

cropping Divers drupal Drupal emacs firefox gmap Google Images Jquery jquery karmic koala La phrase du jour Lausanne Logiciels libres mysql PHP 5 RPG Sys admin ubuntu Web Dev yasnippet youtube Zend
more tags

Popular content

Today's:

  • Squall Beer Challenge '09
  • Boxxy likes Drupal
  • Emacs Transparent
  • Grep afficher les lignes avant et après
  • Trip to antwerpen !
  • 8ème Forum eCulture - ERACOM - 4 septembre 2009
  • viportuguese-shop.com
  • Drupal Mollom sa rox!
  • Tinymce styles sorted
  • Drupal solr attachement intégration

All time:

  • Drupal 7 effet avec les jquery.ui.dialog sur Drupal 6 !
  • Dries Keynote DrupalCon Paris 2009
  • Drupal bridge zend yeah !!
  • Jquery slider c'est de la bonne !!!
  • Drupal and Zend, form validate :)
  • Jquery JSON en _POST
  • [Drupal] Lightbox avec une gmap! yeah
  • [Drupal] Domain Access & memcache sa donne quoi ?
  • viportuguese-shop.com
  • Node Import et Taxonomy CSV

Last viewed:

  • C'est un peu court jeune homme
  • Yeah toast !!
  • Drupal, timezone "It is not safe to rely on the system's timezone settings."
  • Drupal tabs
  • Trip to antwerpen !
  • Drupal solr attachement intégration
  • [Drupal] Lightbox avec une gmap! yeah
  • Drupal sitemap module
  • Drupal, nodeapi full et de base
  • Drupal intranet performance

Twitter

Latest Articles

Derniers liens publiés

  • Get the list of all enabled module
    http://drupal.org/node/440962
  • Cloudflare et Dropbox nommés Technology pioneers
    http://techcrunch.com/2011/09/01/cloudflare-dropbox-palantir-and-kickstarter-named-technology-pioneers-by-the-world-economic-forum/
  • Apprend le javascript en t'amusant
    http://www.codecademy.com
  • EPSACrop sur Drupal 7
    http://www.aswissidea.org/
  • Drupal solr attachement intégration
    http://tika.apache.org/

Pub

Google gadget

Add to Google

Facebook page

jiwa

all good song

Partenaires

Cyber Warfare

Drupal Factory

Dev Factory

I love Smashing Magazine!
Fervens Drupal theme by Leow Kah Thong. Designed by Design Disease and brought to you by Smashing Magazine.