Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-08-2011, 01:12 PM   PM User | #1
Ty44ler
New Coder

 
Join Date: Feb 2008
Posts: 57
Thanks: 8
Thanked 0 Times in 0 Posts
Ty44ler is an unknown quantity at this point
Video not playing in older IE

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:
Code:
  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:
Code:
<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!
Ty44ler is offline   Reply With Quote
Reply

Bookmarks

Tags
backup, explorer, flash, html5, video

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:22 AM.


Advertisement
Log in to turn off these ads.