ThemeShaper Forums » Thematic

[closed]

SWF video in background

(6 posts)
  • Started 4 years ago by totalaccomplishment
  • Latest reply from d_rec
  • This topic is not resolved
  1. Hello,

    i'm making a band site and would ideally like to have a swf video playing in the background, with the title, menu, content and sidebar floating on top of it.

    I'm not concerned about video quality, it's supposed to look pixelated, I threw a mock up depiction here.

    http://totalaccomplishment.com/wp-content/uploads/2010/10/videobackground.jpg

    Do you know how difficult this would be to put together? I know almost nothing about css and want some idea before I potentially pay someone to put this in place.

    Thanks so much,

    Mat

    Posted 4 years ago #
  2. i haven't used it... but if you can use jquery, i come across this
    http://pupunzi.com/#mb.components/mb.YTPlayer/YTPlayer.html

    Posted 4 years ago #
  3. Very cool, thanks a lot Jonny! I don't even know what jquery is, but will endeavor to find out :)

    Posted 4 years ago #
  4. 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.

    Posted 3 years ago #
  5. Thanks so much d_rec. Do you have an example I can look at?

    I recently found this, which apparently works well with wordpress themes (although I can't seem to figure out how to get it to work with thematic yet!!)

    http://www.thirsty-eyes.com/wordpress_flash_video_background_blog/

    x

    Posted 3 years ago #
  6. Not live unfortunately, maybe in a week or two I might find use for this. Download the source from here(free); http://pupunzi.com/#mb.components/mb.YTPlayer/YTPlayer.html and make sure you have the right path for the Javascript files. I'm new to this and I'll fix this code up a little shortly.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.