title: Change Video <object> to <iframe>
body: <p>This is my code, it
  s in a joomla template. It plays videos in Flash on browsers and Iframe on Iphones or Ipads. How can I change is so that browsers use iframe instead of flash object?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>function showVimeo($vimeo_link, $width, $height)
   {
   
    $num = str_replace('http://vimeo.com/','',$vimeo_link);
    $num = trim($num); 
   
    $iPhone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
    $iPad = strpos($_SERVER['HTTP_USER_AGENT'],"iPad");
    if ($iPhone == true || $iPad ==true) 
    {
     return '&lt;iframe src="http://player.vimeo.com/video/'.$num.'" width="'.$width.'" height="'.$height.'" frameborder="0"&gt;&lt;/iframe&gt;'; 
    }
    else
    {   
     return  '&lt;object width="'.$width.'" height="'.$height.'"&gt;'.
       '&lt;param name="allowfullscreen" value="true" /&gt;'.
       '&lt;param name="allowscriptaccess" value="always" /&gt;'.
       '&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id='.$num.'&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=1&amp;amp;color=00ADEF&amp;amp;fullscreen=1&amp;amp;autoplay=0&amp;amp;loop=0" /&gt;'.
       '&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id='.$num.'&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=1&amp;amp;color=00ADEF&amp;amp;fullscreen=1&amp;amp;autoplay=0&amp;amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'.$width.'" height="'.$height.'"&gt;&lt;/embed&gt;'.
       '&lt;/object&gt;';
    }</code></pre>
  </div>
  </div>
  </p>