From 7e56ba6408a8e7cf266174d39fd5e1d457e64a61 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Fri, 11 Aug 2017 15:52:20 +0200
Subject: [PATCH] Make custom video player triggerable in tweet detail

---
 Resources/Scripts/code.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js
index 07b8f99c..1673bb5d 100644
--- a/Resources/Scripts/code.js
+++ b/Resources/Scripts/code.js
@@ -814,6 +814,9 @@
       e.stopPropagation();
     });
     
+    TD.mustaches["status/media_thumb.mustache"] = TD.mustaches["status/media_thumb.mustache"].replace("is-gif", "is-gif is-paused");
+    TD.mustaches["media/native_video.mustache"] = '<div class="js-media-gif-container media-item nbfc is-video" style="background-image:url({{imageSrc}})"><video class="js-media-gif media-item-gif full-width block {{#isPossiblySensitive}}is-invisible{{/isPossiblySensitive}}" loop src="{{videoUrl}}"></video><a class="js-gif-play pin-all is-actionable">{{> media/video_overlay}}</a></div>';
+    
     if (!ensurePropertyExists(TD, "components", "MediaGallery", "prototype", "_loadTweet") ||
         !ensurePropertyExists(TD, "components", "BaseModal", "prototype", "setAndShowContainer") ||
         !ensurePropertyExists(TD, "ui", "Column", "prototype", "playGifIfNotManuallyPaused"))return;
@@ -837,7 +840,6 @@
     });
     
     TD.ui.Column.prototype.playGifIfNotManuallyPaused = function(){};
-    TD.mustaches["status/media_thumb.mustache"] = TD.mustaches["status/media_thumb.mustache"].replace("is-gif", "is-gif is-paused");
   })();
   
   //