• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Video Share BB Code Error

#1
When share a video using "Share BB [GALLERY] Code" the video is not show properly in a forum thread, but if you share in same gallery as a coment video show perfect

Screen Shot 07-22-15 at 02.23 PM.PNG Screen Shot 07-22-15 at 02.22 PM.PNG
 

Chris D

XenForo developer
Staff member
#3
I think this is the same issue we spotted earlier today.

Try this... Find the template: xengallery_bb_code_tag_gallery_media

Find:
Code:
<video id="media-video-{$media.media_id}" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" width="{xen:calc '{$media.width} / 2'}" height="{xen:calc '{$media.height} / 2'}" data-setup="{}">
Replace with:
Code:
<video id="media-video-{$media.media_id}" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" width="500" height="300" data-setup="{}">
 

Chris D

XenForo developer
Staff member
#5
Quick and dirty way is to add the following to EXTRA.css:

Code:
    .Responsive.GalleryLazyLoader .galleryBbCode .mediaContainer .videoContainer
    {
        position: relative;
        padding-bottom: 56.25%;
        height: 0; overflow: hidden;
        margin-bottom: 10px;
    }
   
    .Responsive.GalleryLazyLoader .galleryBbCode .mediaContainer .video-js
    {
        @property "mediaViewVideo";
        margin-bottom: 10px;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        @property "/mediaViewVideo";
        top: 1px;
        max-height: 400px;
    }
   
    .Responsive.GalleryLazyLoader .galleryBbCode .mediaContainer .video-js
    {
        width: 100%!important;
        height: 100%!important;
    }
This code usually comes into effect with the responsive design at a certain max-width, adding it to EXTRA.css will effectively make it "permanent".