Skip Navigation

[Resolved] Embedding a video but it won't size. It is always full width

This support ticket is created 7 years 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.

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 6 replies, has 2 voices.

Last updated by Luo Yang 7 years ago.

Assisted by: Luo Yang.

Author
Posts
#584580

I am trying to: Embed video (working on localhost).

Link to a page where the issue can be seen:

I expected to see: Small embedded video

Instead, I got: full screen embedded video

#584699

Dear Felix,

I assume we area talking about the custom "Embedded media" field created with Types plugin, please check our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media
You can specific the width and height attibutes within shortcode [types], for example:
[types field="my-embedded-media-field" width="450" height="320"][/types]
width:
image width (e.g. 300)
Image will be resized before being sent to the client. width and height will be ignored if size is set. For Embedded media the width and height are maximum values and may be ignored if $content_width is set for the theme.

#585054
2017-11-01 23_47_09-.jpg

I have no problem setting image heights, my problem is with embedded youtube video media.

Since I reported this problem to you, I was able to get it to work with 3 columns in a row (specified in the loop).

When I increase the number of columns to 4, I get the same problem I had before, the videos take the full screen and appear vertically in one column. Setting the width and height do nothing to change the size of the video preview.

An interesting thing happens when I set the columns back to 3, I have to save my content template and view again to get the site to show 3 columns. I attached a picture of the screen.

I would like this to work with 4 columns.

I am using the Divi them and the $content_width is set in the functions.php file for the Theme. Is there any way I can get this to work with Divi or any theme?

#585201

I assume we are talking about this case:
1) There is $content_width settings in your theme file functions.php
2) You are going to setup small width than the $content_width settings

As the document mentioned:
https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media
For Embedded media the width and height are maximum values and may be ignored if $content_width is set for the theme.

So if you have setup the value of $content_width, then the width setting maybe ignored, if you agree, we can take it as a feature request, our developers will evaluate it.

#585228

Ok, take it as a feature request, but that doesn't solve my problem.

So you are saying that I cannot used the Divi Theme because it sets the $content_width variable and there is no way around that. Is that correct.

I was able to get 3 columns by using custom CSS (without specifying the width of the video preview).

#585481

I do not believe I closed this case. Can you please answer my most recent reply? Thanks

#585678

No, what I mean is there isn't such a built-in feature within Types plugin, see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media

If you need to use the $content_width settings and a small video width, it needs custom CSS codes, if you need assistance for it, please provide a live page URL with same problem, I can try setup a CSS codes for you, thanks