Hello
How can I disable the autorize of YouTube videos? It is a javascript code in the tagdiv_theme.js file that overwrites the css. I have videos on YouTube in 4:3 and 16:9 ratio. The autoresize uses only 16:9 ratios. I need to control the responsive of videos only with CSS, not javascript.
Best regards.
Joseph
Hi,
If you are referring to video support you can check this file -> wp-content/plugins/td-composer/legacy/common/wp_booster/td_video_support.php and for video playlist here -> wp-content/plugins/td-composer/legacy/common/wp_booster/td_video_playlist_render.php
Thank you!
Hi.
I checked those files but and any modification is overwritten by the javascript td_resize_videos function in the file tagdiv_theme.js / tagdiv_theme.min.js line 5009:
jQuery (document) .find ('iframe [src * = "youtube.com"]'). each (function () {
var videoMainContainer = jQuery (this) .parent (). parent (). parent (),
videoInPlaylist = jQuery (this) .parent (). hasClass ("td_wrapper_playlist_player_vimeo"),
video43AspectRatio = videoMainContainer.hasClass ("vc_video-aspect-ratio-43"), // the video is set to 4: 3 aspect ratio
video235AspectRatio = videoMainContainer.hasClass ("vc_video-aspect-ratio-235"); // the video is set to 2.35: 1 aspect ratio
if (videoInPlaylist || video43AspectRatio || video235AspectRatio) {
// do nothing for playlist player youtube or aspect ratios 4:3 and 2.35:1
// the video aspect ratio can be set on Visual Composer - Video Player widget settings
} else {
var td_video = jQuery (this);
td_video.attr ('width', '100%');
var td_video_width = td_video.width ();
td_video.css ('height', td_video_width * 0.5625, 'important');
}
});
If I modify any file in the td_composer plugin, these will be lost when I upgrade to a new version.
I am using the Featured video in the post to insert the video because it generates thumbnails directly from YouTube.
http://prntscr.com/po670t
In the td_resize_videos code there is no action declared when the ratio is 4:3. I want to do it then by CSS, but javascript overwrites it.
Have you considered a setting in the Theme Panel to disable or enable the autorize of the javascript function?
Can you tell me a solution? Can you disable the autoresize?
Best regards
Joseph
Hi,
For each image set as featured image/video our theme will make a thumb -> https://forum.tagdiv.com/theme-thumbs/ that will be use inside the posts and on blocks/modules.
Also foe the moment there is no option to deactivate this, js, but you can choose the thumbs -> http://prntscr.com/pp12yr that you want to be create and use only the modules that have set a featured image with that dimension, or you can use flex blocks, you can choose on these the image size.
Thank you for your understanding!