Basically, I want to add another video provider... I got this far... all I ever get is a white box... yet details, including the link are in the html tags in firebug.

Summary, white box, no player to show video.

I have been pulling my hair out over this :(

Here is code:

function video_embed_website_handle_video($url, $settings) {
  $name = _video_embed_website_get_video_name($url);
  $id = _video_embed_website_get_video_id($url);
  if ($id) {
    $embed = '<object width="!width" height="!height" >
    <param name="movie" value="http://us-st.website.com/embed_test2.swf" ></param>
    <param name="allowFullScreen" value="!fullscreen"></param>
    <param name="allowScriptAccess" value="always"></param>
	<param name="wmode" value="transparent"></param>
    <embed type="application/x-shockwave-flash" src="http://website.com/embed.php?video=!id" width="!width" height="!height" allowfullscreen="!fullscreen" allowscriptaccess="always" id="player" type="application/x-shockwave-flash" name="player" style="visibility: visible"></embed>
    </object>';
    $embed = format_string($embed, array(
      '!id' => $id,
      '!fullscreen' => $settings['allowfullscreen'] ? 'true' : 'false',
      '!autoplay' => $settings['allowautoplay'] ? 'true' : 'false',
      '!width' => $settings['width'],
      '!height' => $settings['height'],
      )
    );
    $video = array(
      '#markup' => $embed,
    );
    return $video;
  }
  // Return an empty string if there is no id, so we don't have broken embeds.
  return '';
}

Comments

JohnnyW’s picture

Update.... I tried a different way.... think this, like Dailymotion

The html looks like this inside of browser...

<div class="field field-name-field-videotesting field-type-video-embed-field field-label-above">
<div class="field-label">videotesting: </div>
<div class="field-items">
<div class="field-item even">
<div class="embedded-video">
<div class="player">
<object>
<param value="http://website.com/movies/1ADDSF/home_movie.html" name="movie">
<param value="true" name="allowFullScreen">
<param value="always" name="allowScriptAccess">
<param value="transparent" name="wmode">
<embed width="640" height="480" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" src="http://website.com/movies/1ADDSF/home_movie.htm">
</object>

As you can see it looks good, but I am still getting a white screen :(

// website is the website I am interested in that does allowing embeding
//embed_test2.swf is where their flash video player is located
//embed.php?video=!id is the ending url that shows embed link and does work, you can see it in html firebug

function video_embed_website_handle_video($url, $settings) {
  $name = _video_embed_website_get_video_name($url);
  $id = _video_embed_website_get_video_id($url);
  if ($id) {
    $embed = '<object width="!width" height="!height">
    <param name="movie" value="http://website.com/movies/' . $id . '/' . $name .'"></param>
    <param name="allowFullScreen" value="!fullscreen"></param>
    <param name="allowScriptAccess" value="always"></param>
	<param name="wmode" value="transparent"></param>
	 <embed src="http://website.com/movies/' . $id . '/' . $name .'" type="application/x-shockwave-flash" ' .
    'width="!width" height="!height" allowfullscreen="!fullscreen" allowscriptaccess="always"></embed>
    </object>';
    $embed = format_string($embed, array(
      '!id' => $id,
      '!fullscreen' => $settings['allowfullscreen'] ? 'true' : 'false',
      '!autoplay' => $settings['allowautoplay'] ? 'true' : 'false',
      '!width' => $settings['width'],
      '!height' => $settings['height'],
      ) 
    );
    $video = array(
      '#markup' => $embed,
    );
    return $video;
  }
  // Return an empty string if there is no id, so we don't have broken embeds.
  return '';
}
JohnnyW’s picture

Basically, player is a white box... not inside player but THE PLAYER, button and all, is white.