Hi,
you can add following CSS code yo your template:
jQuery(document).ready(function(){
jQuery('.comment_message a[href*="youtube"]').each(function(){
var video_id = jQuery(this).attr('href').split('v=')[1];
var ampersandPosition = video_id.indexOf('&');
if(ampersandPosition != -1) {
video_id = video_id.substring(0, ampersandPosition);
}
jQuery(this).closest('.comment_message').after('<iframe width="100%" height="315" src="https://www.youtube.com/embed/'+video_id+'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>');
});
jQuery('.comment_message a[href*="vimeo"]').each(function(){
var video_id = jQuery(this).attr('href').split('vimeo.com/')[1];
var ampersandPosition = video_id.indexOf('&');
if(ampersandPosition != -1) {
video_id = video_id.substring(0, ampersandPosition);
}
jQuery(this).closest('.comment_message').after('<iframe src="https://player.vimeo.com/video/282577747" width="100%" height="315" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>');
});
});
With this code each Youtube or Vimeo link in the comment will load the video (see screenshot)