I am using an embedded media field to insert YouTube videos into my site.
The shortcode I am using is: [types field='webinar-youtube-video' width='800px'][/types]
The resulting output it not responsive; the videos get cropped at some screen sizes.
I was unable to find anything in your documentation addressing this, and the forum discussions on this topic were all 2+ years old. So I thought I would ask what is the current best practice using Types & Views to make the embedded media field output responsive.
Hello. Thank you for contacting the Toolset support.
First of all, after checking debug information you shared with us, I found that you are using outdated Types plugin.
*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest official released version. You can download it form:
=> https://toolset.com/account/downloads/
After update if your issue still persists, you should try to use Bootstrap to display responsive video:
=> hidden link
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
I already stated the issue I'm having. The iframe is larger than its container. Please look back at my second post!
I do see now that all of the videos are responsive once they are played. It is only the static preview image that is cropped. Please let me know how to fix this.
The solution at hidden link requires the ability to add a class to the iframe. Correct me if I'm wrong, but I don't think that's possible with the wp-types video embed shortcode.
This seems to be working. The 100% width and height are overriding the iframe's width and height that the shortcode is creating.
But, this isn't a very elegant solution. It would be nice if the shortcode didn't output a height and width for the iframe if one is not specified. Or add the ability to pass a class and/or a width and height as a percentage.