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 !
Tags:






Recent comments
40 weeks 1 day ago
46 weeks 4 days ago
46 weeks 6 days ago
50 weeks 5 days ago
50 weeks 5 days ago
50 weeks 6 days ago
1 year 3 weeks ago
1 year 5 weeks ago
1 year 5 weeks ago
1 year 5 weeks ago