By Jordan Weinstein on Sunday, 13 August 2017
Replies 6
Likes 0
Views 739
Votes 0
Hello,

The standard YouTube link produces a video title link on the top left the video. Some users might click that rather than the play button and return back to YouTube - defeating the purpose of the embed.

If you append "showinfo=0" to the embed the title goes away. So going from the current link:

https://www.youtube.com/embed/pHCfWfbpu9k?feature=oembed

to

https://www.youtube.com/embed/pHCfWfbpu9k?feature=oembed&showinfo=0

does the trick. I managed to do this by adding this Javascript to my EasySocial pages:


var hideLinkHeader = '&showinfo=0';

//Loop through every iframe in .frame-wrap
jQuery.each(jQuery('.video-container').find('iframe'), function(index, i)
{
//set url equal to this iteration's iframe's src
var url = jQuery(i).attr('src');

//set this iteration's iframe's src equal to url plus the hideLinkHeader global variable
jQuery(i).attr('src', url + hideLinkHeader);

});


And this works. However, is there a way to append this via PHP so that the output is modified directly rather than with Javascript. I could not find where the embed links are generated within EasySocial.

Jordan
Hey Jordan,

Actually how Easysocial render the Youtube video on the page is, when the user create a new video that moment, it will store all the video iframe code into video table then just retrieve back the iframe code from database and render out the video on the page.

Since those video iframe data already stored into database, then you have to manually append this query string showinfo=0 into this PHP file -> JoomlaFolder/administrator/components/com_easysocial/includes/video/video.php under this method getLinkEmbedCodes

By the way, thanks for your input, perhaps I can move this thread to feature request category so we will see if there a lot of user request this similar feature, if yes, we will definitely consider implement this in the future version.
·
Monday, 14 August 2017 11:04
·
0 Likes
·
0 Votes
·
0 Comments
·
+1
·
Monday, 14 August 2017 15:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Stan
·
Monday, 14 August 2017 15:52
·
0 Likes
·
0 Votes
·
0 Comments
·
+1
·
Monday, 14 August 2017 16:30
·
0 Likes
·
0 Votes
·
0 Comments
·
OK, great Arlex,

I just added one more str_replace:


$codes = str_replace('?feature=oembed', '?feature=oembed&showinfo=0', $codes);


Jordan
·
Monday, 14 August 2017 17:59
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome Jordan
·
Monday, 14 August 2017 18:42
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post