Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #897044

    I can’t always use enfold’s video element because it’s only good for 16×9 or 4×3 video proportions
    sometimes I need to show very untraditional video sizes like 238×140 pixel or 250×250 pixel and so on,
    so I found a very simple workaround for that:
    WordPress built in video shortcode enables to define the exact video size, for example
    [video width="238" height="140" src="path/to/file.mp4"] will show the video in the exact defined size
    here you can see few examples: http://www.doronwolf.com/video-test/

    Problem rises only when i need to show video which is wider than 600 pixel:
    for example if you look again in the same link at the right column you will see a movie which is 600 pixel wide and 158 pixel height even though it’s shortcode is [video width="800" height="210" src="path/to/file.mp4"] !

    I did some googling and found this: https://wordpress.stackexchange.com/questions/124075/videos-via-the-video-shortcode-are-always-640px-wide
    maybe it’s the same case with Enfold (but 600 pixel wide instead of 640)?
    and if so, can I use the solution suggested there work with enfold too (by writing it into the function.php file in my child theme)?
    how can I tell the theme to let the video short code use up to the column width instead of up to 600 pixel?

    • This topic was modified 6 years, 9 months ago by Doron.
    #897048

    update:
    I’ve manged to display the video in the correct size by using layerslider but than it’s not responsive
    so I’ve change it to be responsive (in the slider settings) but than the movie becomes wider than the actual size

    so I still hope there’s way to solve the shortcode problem because the shortcode is always responsive
    (when using video shortcode the movie will the display in the actual size and in small screens when the column width is smaller than the video width, the video will display at the max width of the column)
    will appreciate any help

    • This reply was modified 6 years, 9 months ago by Doron. Reason: typo
    #898201

    Hi,

    The actual solution is the secton, to use the video shortcode.
    And the video is supposed to take the size of the column, so that behavior is the proper.

    Best regards,
    Basilis

    #898256

    Hi Basilis
    I think you misunderstood me (maybe you read only my second post?)
    please look in this screen shot https://www.dropbox.com/s/kzvufpaivl12lfr/Screenshot_011718_015318_AM.jpg?dl=0
    or simply look again in http://www.doronwolf.com/video-test/ and read my first post

    only when i used layerslider (or enfold’s video element) the video take the size of the column
    when using WordPress video shortcode with exact dimensions – video will not take the size of the column
    WordPress built in video shortcode enables to define the exact video size and it seems to work in enfold as long as the video width is smaller than 600 pixel (as you can see: the 2 videos from the left column are way smaller the the column width …and it’s cool! that’s exactly how I want them to be)

    my original question was about a time when I need to show video which is wider than 600 pixel (but i don’t want it to take the size of the column):
    for example if you look again in the same link at the right column you will see a movie which is 600 pixel wide and 158 pixel height even though it’s shortcode is [video width="800" height="210" src="path/to/file.mp4"] !
    (and 600 pixel is way smaller from the containing column width!)

    I can’t use enfold’s video element for this video because it’s only good for 16×9 or 4×3 video proportions
    i want to use WordPress built in video shortcode becouse it enables me to define the exact video size and still keep the video responsive on small screens
    how can I tell the theme to let WordPress’s video shortcode use up to the column width instead of up to just 600 pixel?
    will this soltion work with enfold? https://wordpress.stackexchange.com/questions/124075/videos-via-the-video-shortcode-are-always-640px-wide

    • This reply was modified 6 years, 9 months ago by Doron. Reason: typo
    #900106

    Hi,

    Thank you for the info.

    Add the following css code to remove the width limitation.

    .wp-video {
        width: 100% !important;
    }

    If you want to apply it to a specific video, wrap the video shortcode inside a container with a unique class attribute.

    Best regards,
    Ismael

    #900222

    Hi Ismael
    thank you
    please note that your css code effects all videos on the page, even the 250 pixel wide video turned into a ‘full column width video’
    and i simply want to keep videos in their original size, that’s all
    I guess I’ll have to do as you suggested and warp wide videos shortcode inside a container with a unique class attribute

    it’s really strange there isn’t way to remove the limitation without forcing the videos to take the full column width..
    we should be able tell WordPress’s video shortcode use up to the column width and not always be full column width..
    any way thanks for all your help

    #900538

    Hi,

    The width of the wp-video container is being added dynamically but I’m not sure what script is responsible for it. The css code above should override it.

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.