Ty44ler Posted August 5, 2011 Share Posted August 5, 2011 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! Quote Link to comment https://forums.phpfreaks.com/topic/243932-video-not-playing-in-older-ie/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.