From 75aab8fd8cf64b431ece6c71d80e0c49ff01718b Mon Sep 17 00:00:00 2001 From: Pete Date: Fri, 20 Apr 2018 17:32:07 +0100 Subject: [PATCH] Prevent Youtube showing "related videos" This change stops YouTube trying to show related videos at the end (which most of the time aren't relevant!) Nwadays YouTube also autoplays the next video too which isn't generally desired. You could make this optional, but I would suggest the majority of people won't want to show random videos at the end. --- TextformatterVideoEmbed.module | 1 + 1 file changed, 1 insertion(+) diff --git a/TextformatterVideoEmbed.module b/TextformatterVideoEmbed.module index 6e30bbe..970f181 100644 --- a/TextformatterVideoEmbed.module +++ b/TextformatterVideoEmbed.module @@ -99,6 +99,7 @@ class TextformatterVideoEmbed extends Textformatter implements ConfigurableModul if(is_array($data) && isset($data['html'])) { $embedCode = $data['html']; + $embedCode = str_replace('feature=oembed', 'feature=oembed&rel=0', $embedCode); $sql = "INSERT INTO $table SET " . "video_id=:videoID, " .