Skip Navigation

[Resolved] Setting the width of the embedded video player

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to set the width of his embedded video player.

Solution:

This can be done by using the Width attribute for the types shortcode.

For more information you can take a look at the link below.
https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media

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

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 2 voices.

Last updated by josephQ 6 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#920268
desired result.png
current result.png

Tell us what you are trying to do? Display Vimeo videos whose initial image (before being played) is 100% of the column width. See attached image "desired result.png." The custom post type is using the Embedded Media field type. What's currently happening is that the video is being displayed narrower than the column width and the video is centered; see "current result.png" or visit hidden link. I tried modifying CSS, but it appears the video is being displayed through an iframe on another site, therefore I can't set the desired width.

Is there any documentation that you are following? No.

Is there a similar example that we can see?

What is the link to your site? hidden link

#920545

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Joseph,

Thank you for contacting our support forum.

For the embedded media custom field there is a width attribute that you can use on the types shortcode to change the width of the player.

https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media

Please let me know if this helps.
Thanks,
Shane

#920583
vimeo embed details.png
edit cell.png

Shane,

Thanks for your help. I tried setting the width to 100% (see "edit cell.png"), but that didn't work. The settings were over-ridden by the contents of the iframe (which includes a stylesheet named player.css that lives on a Vimeo sever). Please refer to "vimeo embed details.png." As you can see, there's a width of 579px assigned to the vp-player-layout class.

What do you think?

#920869

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Joseph,

I see the issue.

Would you mind allowing me to have admin access to this so that I can assist better?

Thanks,
Shane

#921456

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Joseph,

It seems to be an issue with the vimeo video player. I've added a youtube video as a test and it works and extends the full width of the container.

Perhaps what you need to do is copy the entire vimeo embedded iframe link and use a single line field to add the videos.

Thanks,
Shane

#922258

Shane,

Thanks for your response. I'll give it a shot!