Skip Navigation

[Resolved] Video too tall

This support ticket is created 5 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 9 replies, has 2 voices.

Last updated by Luo Yang 5 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#745097

I am trying to:
Include specific video field in my content view

Link to a page where the issue can be seen:
hidden link

I expected to see:
The video must exactly fit its size

Instead, I got:
big black areas on top and bottom of the video. The video area seems to be a square ?

#746424

Hello,

Please elaborate the question with more details:
How do you setup the video field? with Types plugin?
How do you display the video field value? With types shortcode?

If it is a video field created with Types plugin, please follow our document to display the video field value:
https://toolset.com/documentation/customizing-sites-using-php/functions/#video
You can setup the width/height of Types video field shortcode.

I have checked the URL you mentioned above, it seems there are some custom JS codes working on your website for example:

<script>document.createElement('video');</script>

In case it is a compatibility problem, please try this:
deactivate other plugins and switch to wordpress default theme, and test again

#746640

Hi,

- I'm using a type custom-field : a video field not an embeded one. It's name is 'presentation' with multiple value (so i can add several videos to one post).
- The code i use is :
[wpv-for-each field="wpcf-presentation"]
[types field='presentation'][/types]
[/wpv-for-each]

I already tried with :
[wpv-for-each field="wpcf-presentation"]
[types field='presentation' width="50"][/types]
[/wpv-for-each]

Same result.

For the plugin i only use Toolset Layout, Map, View and Type and FooBox, WP Sync DB.

I tried out in local without FooBox and WP Sync DB and standard Theme (Twentyseventeen), Same problem with the video. The html code is as follow :
<div style="width: 50px;" class="wp-video"><!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->
<video class="wp-video-shortcode" id="video-218-1" width="50" height="320" preload="metadata" controls="controls"><source type="video/mp4" src="hidden link" /><a href="hidden link">hidden link;

<div style="width: 50px;" class="wp-video"><video class="wp-video-shortcode" id="video-218-2" width="50" height="320" preload="metadata" controls="controls"><source type="video/mp4" src="hidden link" /><a href="hidden link">hidden link;

</div>
Regards

#746743

Thanks for the details, I have tried the steps you mentioned above in below test site:
hidden link

With similar codes as you mentioned above:
hidden link
user/pass: admin/111111

[wpv-for-each field="wpcf-presentation"]
[types field='presentation' width="200" height="200"][/types]
[/wpv-for-each]

It works fine, so it should be a compatibility problem of your website, have you tried to switch theme files?
Can you duplicate same problem in above test site?

And the JS codes createElement('video') is wordpress feature, it does not related to this issue.

#746866

Hello,

I have made some tests. This code :

[wpv-for-each field="wpcf-presentation"]
[types field='presentation'][/types]
[/wpv-for-each]

is part of a content template for the custom type 'step' and is named Step Summary.
This content template is used within a layout (named Step detail) that is a child layout of my main layout.

If i display the post (step Lee-Vining actually) without the standard layout (menu stop using layout and choosing a specific content template for this post with the same code), it works as expected (good sizes).

So the problem comes from the main layout. But i can't figure out where exactly.

#746924

I assume you have already tried as I mentioned above, if it is not a compatibility problem, please provide a database dump file (ZIP file) of your website in below private detail box, I need to test and debug it in my localhost, thanks

#747241
Capture du 2018-04-27 11-09-34.png
Capture du 2018-04-27 11-08-50.png

Hi,

I make some more tests.

If i create a layout with only this code :

<h1>[wpv-post-title]</h1>
<p>[types field='presentation' separator=', '][/types]</p>

It works as expected.

But if i create a child layout with the SAME code, the problem appears. The layout of the parent layout contain only a child layout cell ?

Regards

#747257

Thanks for the details, it seems to be a CSS problem, please try this in your website, edit the content template "Step detail", click "CSS Editor", add below CSS codes:

div.wp-video-shortcode, video.wp-video-shortcode{
max-height: 650px !important;
}

And test again, more help:
hidden link

#747290

It works but i can not change the video size with width or height argument. It always uses full width (when i use a child layout).

#747423

Yes, you are right, the height and width attribute of Types shortcode for custom video field does not work insider the Layouts, I will escalate this thread to our 2nd tier supporters, currently you can try to control the width and height with CSS codes, for example:

div.wp-video-shortcode, video.wp-video-shortcode{
max-height: 450px;
max-width: 800px;
} 
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.