Jump to content

Video not playing in older IE


Ty44ler

Recommended Posts

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.