VideoJS (HTML5 Video Player) nun auch für Firefox

am 16.11.2010 - 17:51 Uhr in
Hallo ich hatte das Problem nach dem einbinden von VideoJS (HTML5 Video Player), dass mir ein mp4 Video nicht im Firefox abgespielt wird.
Eigentlich benötigt man dafür eine Ogg Datei.
Ich wollte aber nur eine mp4 Datei hochladen.
Dafür habe ich den Code vom Modul geädert und nun springt der HTML 5 Player auf den Flowplayer um sobald das Video nicht in HTML5 abgespielt werden kann.
hier der Code für die videojs.tpl.php:
<?php
// $Id: videojs.tpl.php,v 1.1.2.2 2010/10/31 09:09:40 heshanmw Exp $
/**
* Provide the HTML output of the videojs audio player.
*/
?>
<!-- Begin VideoJS -->
<div class="video-js-box" 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; ?>" class="video-js" width="<?php print(variable_get('videojs_width', 640))?>" height="<?php print(variable_get('videojs_height', 264))?>" controls="controls" preload="auto" poster="">
<?php foreach ($items as $item):?>
<?php $filepath = file_create_url($item['filepath']); ?>
<?php if($item['filemime'] == 'video/mp4') ?>
<source src="<?=$filepath?>" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<?php /*?> <?php if($item['filemime'] == 'application/octet-stream') ?>
<source src="<?=$filepath?>" type='video/webm; codecs="vp8, vorbis"' />
<?php if($item['filemime'] == 'application/ogg') ?>
<source src="<?=$filepath?>" type='video/ogg; codecs="theora, vorbis"' /><?php */?>
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
<!-- @TODO: Add Flowplayer on SWFTools or Flowplayer API modules -->
<object id="flash_fallback_1" class="vjs-flash-fallback" width="<?php print(variable_get('videojs_width', 640))?>" height="<?php print(variable_get('videojs_height', 264))?>" type="application/x-shockwave-flash"
data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":["http://video-js.zencoder.com/oceans-clip.png", {"url": "<?=$filepath?>","autoPlay":false,"autoBuffering":true}]}' />
<!-- Image Fallback. Typically the same as the poster image. -->
<img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"
title="No video playback capabilities." />
</object>
<?php endforeach; ?>
</video>
</div>
<!-- End VideoJS -->
Konnte das Ganze leider noch nicht im IE testen.
- Anmelden oder Registrieren um Kommentare zu schreiben
Neue Kommentare
vor 11 Stunden 11 Minuten
vor 11 Stunden 15 Minuten
vor 16 Stunden 53 Minuten
vor 21 Stunden 36 Minuten
vor 21 Stunden 39 Minuten
vor 1 Tag 18 Stunden
vor 1 Tag 18 Stunden
vor 1 Tag 18 Stunden
vor 1 Tag 19 Stunden
vor 2 Tagen 21 Stunden