WordPress.org

Ready to get started?Download WordPress

Forums

Video Thumbnails
Support for jw player (8 posts)

  1. madri2
    Member
    Posted 1 year ago #

    hi,

    i've found that jw player thumbnails aren't detected,
    http://wordpress.org/extend/plugins/jw-player-plugin-for-wordpress/
    so here is my modification to the get_video_thumbnail method
    :
    // jwplayer
    if ( $new_thumbnail == null ) {
    preg_match( '#<script type=\'text/javascript\'>jwplayer\(\'jwplayer-1\'\)\.setup\(.*"image":"(.*)".*\);</script>#U', $markup, $matches );

    if ( isset( $matches[1] ) ) {
    $new_thumbnail = $matches[1];
    }
    }

    feel fry to add it to a next version

    :)

    http://wordpress.org/extend/plugins/video-thumbnails/

  2. madri2
    Member
    Posted 1 year ago #

    preg_match( '#<script type=\'text/javascript\'>jwplayer\(\'jwplayer-[0-9]+\'\)\.setup\(.*"image":"(.*)".*\);</script>#U', $markup, $matches );

    [0-9]+ instead of 1

  3. acidmaster
    Member
    Posted 1 year ago #

    hi madri2,

    where i must add your code for jw player thumbs ?

    which line at video-thumbnails.php ?

  4. madri2
    Member
    Posted 1 year ago #

    line 255

    replace
    // Dailymotion
    if ( $new_thumbnail == null ) {

    replace it like that :

    // jwplayer
    if ( $new_thumbnail == null ) {
    preg_match( '#<script type=\'text/javascript\'>jwplayer\(\'jwplayer-[0-9]+\'\)\.setup\(.*"image":"(.*)".*\);</script>#U', $markup, $matches );

    if ( isset( $matches[1] ) ) {
    $new_thumbnail = $matches[1];
    }
    }

    // Dailymotion
    if ( $new_thumbnail == null ) {

  5. acidmaster
    Member
    Posted 1 year ago #

    hi madri,

    i replace it but dont work. where is the problem ? i add code image below

    http://img109.imageshack.us/img109/7366/vdeothumberror.png

  6. madri2
    Member
    Posted 1 year ago #

    it will only work if you use jwplayer with the javascript api, not with "embed" tags
    do you use the plugin ?
    do you use the v5 ?

  7. acidmaster
    Member
    Posted 1 year ago #

    yes i use plugin and v5

  8. madri2
    Member
    Posted 1 year ago #

    you should use the parameter "image" to the shortcode
    like that
    [jwplayer ... image="http://yoururl.jpg"]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.