WordPress.org

Ready to get started?Download WordPress

Forums

JW Player for Flash & HTML5 Video
[resolved] using JW-player with links vs embedded (10 posts)

  1. Thea G
    Member
    Posted 1 year ago #

    I want to have a library of videos, up to 100 at a time and I don't want each one to be embedded on the page. I have set up a custom post-type with a meta box called 'video' . (Every video has it's own post, providing a description and/or transcript of the movie.)
    Then a list of the posts are available for the viewer to pick and choose. I just want video links, not embedded movies to appear on this page. Oh, and this is wayyy faster.

    In the loop-archive template I use this:

    $movie = get_post_meta(get_the_ID(), 'video', true);
    if ( $movie ) {
        echo '<a href="/wordpress/wp-content/uploads/jw-player-plugin-for-wordpress/player/player.swf?file='.$movie.'" rel="shadowbox;width=400;height=224"> video </a> ';
    
    }

    My question is if there is a better way to use links, perhaps a "built-in to the plug-in" method that I am missing.

    I am using shadowbox-js to pop-up the JW-player instead of using a custom player (since I couldn't get it to work).

    http://wordpress.org/extend/plugins/jw-player-plugin-for-wordpress/

  2. JW Player
    Member
    Plugin Author

    Posted 1 year ago #

    The best way to do this would be to actually use our shortcode, itself.

  3. Thea G
    Member
    Posted 1 year ago #

    Hi LT Video Member...I was hoping you would say that. What is and example of the shortcode to show just a link and not the movie (until it is clicked)?

  4. JW Player
    Member
    Plugin Author

    Posted 1 year ago #

    We have all of our shortcode examples here.

    http://www.longtailvideo.com/support/addons/jw-player-plugin-for-wordpress/11913/jw-player-plugin-for-wordpress-shortcode-examples

    We don't have that sort of an option, with the plugin, though.

  5. Thea G
    Member
    Posted 1 year ago #

    Okay, Thanks. I rethought my strategy, anyway. I'm having a gallery page that shows the list of available movies, and when you click on one, it goes to the loop-single.php template, which does use the shortcode to embed the movie.
    Actually, the callback:

    echo jwplayer_tag_callback("[jwplayer config='libplayer' file='$movie' image='$preview']");

    Works great....now everything is standard and the custom player works. I may make a plug-in for it, since it has some utility.

  6. JW Player
    Member
    Plugin Author

    Posted 1 year ago #

    Np.

  7. Thea G
    Member
    Posted 1 year ago #

    Well, I'll make a plug-in if I can figure out how to make a filter hook that puts that loop-single code into the templates. ...it never ends...

  8. JW Player
    Member
    Plugin Author

    Posted 1 year ago #

    Okay

  9. Jon Brown
    Member
    Posted 1 year ago #

    Pretty sure LongTails JW_Player shortcode won't actually work in metaboxes anyway since they do their filtering of the_content to find it... so you're better off hacking and using the template tag like you did.

    This is also why do_shortcode() doesn't work with jw_player.

    You could also do this:
    https://gist.github.com/2404040

  10. JW Player
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for sharing this Jon.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic