This is not a bug, rather a finding that I want to share with the community. Perhaps it will save you a few hours of headaches.

You can use this to render a player, using a call to the theme() function.

$flash_vars = array(
		'file' => $video_path,
		'image' => $video_thumb_path
);
print theme("jwplayermodule_render_player", "[config-name]", $flash_vars);

Except in page.tpl.php (or variant of page.tpl.php).
The function uses drupal_add_js() to insert the required JS for SWObject.
Once at page.tpl.php, the page is already nearly loaded and drupal_add_js() cannot add JS to the page.

A workaround would be to add the above code to a block, and render that block in page.tpl.php.

Hope this helps someone.

Comments

JW Player’s picture

@lookatthosemoose,

Thanks for posting this tip!

teflo’s picture

Thanks lookatthosemoose!