Been playing with YTPlayer(two posts above) in a Localhost Environment and have gotten the code working, sort of. Now I'm missing something basic with a if (is_front_page())killing the script - nothing will work(I'm tired and it's something I have just missed - tomorrow).
Here's what function I used to get this working.
// Filter away the default scripts loaded with Thematic
function childtheme_head_scripts() {
// Abscence makes the heart grow fonder
}
add_filter('thematic_head_scripts','childtheme_head_scripts');
function add_script() {?>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.metadata.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.mb.YTPlayer.js"></script>
<?php
}
add_action('wp_head', 'add_script');
function childtheme_player() {
// this kills it from working ; if (is_front_page()){
?>
<a id="bgndVideo" href="http://www.youtube.com/watch?v=BsekcY04xvQ"
class="movie {opacity:.8, isBgndMovie:{width:'window',mute:false}, ratio:'16/9',quality:'default'}">
background movie
</a>
<script type="text/javascript">
//load mbyt player
jQuery(function(){
jQuery(".movie").mb_YTPlayer();
});
</script>
<?php
}
add_action('wp_head','childtheme_player');
}
?>
I tried using wp_enqueue_script but I couldn't get this to work.