You are here

function theme_emvideo_google_flash in Embedded Media Field 6.3

Same name and namespace in other branches
  1. 6 contrib/emvideo/providers/google.inc \theme_emvideo_google_flash()
2 theme calls to theme_emvideo_google_flash()
emvideo_google_preview in contrib/emvideo/providers/google.inc
emvideo_google_video in contrib/emvideo/providers/google.inc

File

contrib/emvideo/providers/google.inc, line 59
This include processes Google.com media files for use by emfield.module

Code

function theme_emvideo_google_flash($embed, $width, $height, $autoplay) {
  if ($embed) {
    $autoplay = $autoplay ? '&autoPlay=true' : '';

    // this will be executed by not Internet Explorer browsers
    $output = '<!--[if !IE]> <-->
  <object type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '"
  data="http://video.google.' . variable_get('emvideo_google_domain', EMVIDEO_GOOGLE_DOMAIN_DEFAULT) . '/googleplayer.swf?docId=' . check_plain($embed) . $autoplay . '">
  <!--> <![endif]-->' . "\n";

    // this will be executed by Internet Explorer
    $output .= '<!--[if IE]>
  <object type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '"
  classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">
  <![endif]-->' . "\n";

    // params will be passed to both IE or not IE browsers
    $output .= '<param name="movie" value="http://video.google.' . variable_get('emvideo_google_domain', EMVIDEO_GOOGLE_DOMAIN_DEFAULT) . '/googleplayer.swf?docId=' . check_plain($embed) . $autoplay . '" />' . "\n";

    // following a list of params simply copied from old embed tag params. I don't know if this are really needed.
    $output .= '<param name="quality" value="best" />
    <param name="bgcolor" value="#ffffff" />
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="scale" value="noScale" />
    <param name="wmode" value="transparent" />
    <param name="salign" value="TL" />
    <param name="FlashVars" value="playerMode=embedded" />
    <p>' . t('Your browser is not able to display this multimedia content.') . '</p>
  </object>';
  }
  return $output;
}