...

View Full Version : Video not playing in older IE



Ty44ler
08-08-2011, 01:12 PM
I'm trying to get some videos to play on my site, but they don't work on older IE browsers. I think it has something to do with HTML5 that's in there, but the backup flash file isn't being played either so I'm not sure.

Here's my PHP:

private function createVideoHTML($intVersion) {

$strHTML = "";

if (is_int($intVersion)) {

if ($intVersion >= 0 && $intVersion < $this->intImageCount ) {

$intWidth = $this->arrVersions[$intVersion]["width"];
$intHeight = $this->arrVersions[$intVersion]["height"];
$strFlashSrc = $this->arrVersions[$intVersion]["flash_src"];

$strHTML = " <video width=\"$intWidth\" height=\"$intHeight\" controls>\n";

foreach($this->arrVersions[$intVersion]["video_array"] as $intKey => $strVideo) {

$strSrc = $strVideo["src"];
$strType = $strVideo["type"];
$strCodecs = $strVideo["codecs"];

$strHTML .= " <source src=\"$strSrc\" type=\"$strType\" codecs=\"$strCodecs\">\n";

}

if (strlen($strFlashSrc) > 0) {
$strHTML .= $this->createFlashHTML($strFlashSrc, $intVersion);
}

$strHTML .= " </video>\n\n";
}
}

return $strHTML;

}



Outputted HTML:

<div id="video">

<video width="640" height="360" controls>
<source src="assets/company_reel/company_reel.iphone.mp4" type="video/mp4" codecs="avc1.42E01E, mp4a.40.2">
<source src="assets/company_reel/company_reel.webm" type="video/webm" codecs="vp8, vorbis">
<source src="assets/company_reel/company_reel.theora.ogv" type="video/ogg" codecs="theora, vorbis">
<object width="320" height="240" type="application/x-shockwave-flash" data="assets/company_reel/company_reel.flv">
<param name="movie" value="assets/company_reel/company_reel.flv" />
<param name="allowfullscreen" value="true" />
</object> </video>

Thanks in advance!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum