Dotclear


Ignore:
Timestamp:
11/06/14 10:58:39 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Cope with given dimensions for video, bugfix (HTML5 audio and video)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.media.php

    r2767 r2768  
    10621062     { 
    10631063          $audio = 
    1064                '<audio controls preload="auto">'."\n". 
    1065                '<source src="'.$url.'">'."\n"; 
     1064               '<audio controls preload="auto">'. 
     1065               '<source src="'.$url.'">'; 
    10661066 
    10671067          if ($type == 'audio/mpeg3') { 
     
    11081108                    '<param name="FlashVars" value="'.implode('&amp;',$vars).'" />'. 
    11091109                    __('Embedded Audio Player'). 
    1110                     '</object>'."\n"; 
     1110                    '</object>'; 
    11111111          } 
    11121112 
    11131113          $audio .= 
    1114                '</audio>'."\n"; 
     1114               '</audio>'; 
    11151115 
    11161116          return $audio; 
     
    11291129     { 
    11301130          $video = ''; 
     1131 
     1132          // Cope with width and height, if given 
     1133          $width = 400; 
     1134          $height = 300; 
     1135          if (is_array($args)) { 
     1136               if (!empty($args['width']) && $args['width']) { 
     1137                    $width = (int) $args['width']; 
     1138               } 
     1139               if (!empty($args['height']) && $args['height']) { 
     1140                    $height = (int) $args['height']; 
     1141               } 
     1142          } 
     1143 
    11311144          if ($type != 'video/x-flv') { 
    11321145               $video = 
    1133                     '<video controls preload="auto">'."\n". 
    1134                     '<source src="'.$url.'">'."\n"; 
     1146                    '<video controls preload="auto"'.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').'>'. 
     1147                    '<source src="'.$url.'">'; 
    11351148          } 
    11361149 
     
    11791192                    '<param name="FlashVars" value="'.implode('&amp;',$vars).'" />'. 
    11801193                    __('Embedded Video Player'). 
    1181                     '</object>'."\n"; 
     1194                    '</object>'; 
    11821195          } 
    11831196 
    11841197          if ($type != 'video/x-flv') { 
    11851198               $video .= 
    1186                     '</video>'."\n"; 
     1199                    '</video>'; 
    11871200          } 
    11881201 
Note: See TracChangeset for help on using the changeset viewer.

Sites map