Helping you Build Your Own Social Network!

Faster, better and easier!

Gallery Video Resizing

(8 posts) (3 voices)
  • Started 9 months ago by promocomo
  • Latest reply from Brajesh Singh

  1. Id like to be able to alter both the size of video container box for uploaded video and the thumbnail being shown for youtube/vimeo.

    Please could you tell me how I can achieve this.

    Many thanks

    Posted 9 months ago #
  2. I also would like to change the size of the thumbnail for youtube videos, but didn't find the way to do it, any clue Brajesh?
    Thanks a lot.

    Posted 8 months ago #
  3. Hi Trevor, Emmanuel,
    sorry I could not post earlier. The thing is, it is a little complicated at the moment.

    You can control the size of video/audio/photo for thumb/mid/larger using a filter but currently, gallery will not be able to distinguish an uploaded video from a remote video.

    The way to get around it will be to modify the video-loop/video-single.php in template files. That will make it work, but there is a problem if you are using media widgets and displaying the videos in that. It will be displayed as you set the size using my mentioned filter.

    Will that be ok? I will be happy to post the code and the instruction here.

    Posted 8 months ago #
  4. Hi Brajesh,
    As I don't use any media widget, it is fine for me.
    I tried to put the filter described in the documentation section of the bp-gallery plugin in my functions.php file, but it seems to have no effect on the video size.
    Here is the code I used :

    add_filter('bp_get_gallery_media_sizes','change_media_size',10,2);
    function change_media_size($settings,$media_type){
    if($media_type=="video"){
    $settings['thumb']=array('height'=>220,'width'=>300);
    $settings['mid']=array('height'=>220,'width'=>300);
    $settings['larger']=array('height'=>505,'width'=>640);
    }
    return $settings;
    }

    Thanks for your help

    Posted 8 months ago #
  5. Hi Emmanuel,
    you are using correct code. It will have effect on any new remote uploads(won't have any effect on existing remote videos(youtube,others).

    Please try adding a new youtube video.

    Posted 8 months ago #
  6. I tried to add a new video from Youtube and it works great !
    Thanks for your help!

    Posted 8 months ago #
  7. Worked for me too... many thanks

    Posted 8 months ago #
  8. You are most welcome :)

    Posted 8 months ago #

Reply

You must log in to post.