ThemeShaper Forums » Thematic

[closed]

Inserting Flowplayer into Thematic - Works in Page, Not in Widget. Why?

(2 posts)
  • Started 10 years ago by awarner20
  • Latest reply from awarner20
  • This topic is resolved
  1. Hi folks,

    I know this is borderline out of the realm of Thematic, but I figured I'd ask to get your thoughts.

    I am using the open source FlowPlayer to display videos on my site. There is a WP plugin to accomplish this, but it severely limits the flexibility of the player configuration, so I'm doing it manually which involves putting javascript in the <head>, then using an href and another javascript chunk in your page to display your video. It's works great on my test page, but I've tried to place in a text widget without success. I wonder if anyone here can clue me in as to why?

    I've used this function to place the <head> script:

    // ADDING FLOWPLAYER SCRIPT TO <head>
    function childtheme_scripts() {?>
    <script src="http://www.mysite.net/video/flowplayer-3.1.4.min.js"></script>
    <?php }
    add_action('wp_head','childtheme_scripts');

    and then this code in my page:

    <a href="http://www.mysite.net/video/myvideo.flv" style="display:block;width:640px;height:480px;" id="player"></a>
    <script language="JavaScript">
        flowplayer("player", "http://www.mysite.net/video/flowplayer-3.1.5.swf");
    </script>
    Posted 10 years ago #
  2. I beg your forgiveness. I have solved this and it was a silly mistake on my part. I was trying to view the widget video on the same page that I had inserted the video previously. Specific code is needed to enable multiple players on the same page. I used Widget Logic to show this widget on all pages except the video test page.

    //Is Not Page video-test//
    !is_page('video-test')

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.