mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Better video players, does not autoplay
This commit is contained in:
		@@ -782,6 +782,11 @@ p.mentioned span.chatmessage {
 | 
				
			|||||||
  max-width: none;
 | 
					  max-width: none;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.richembed .video {
 | 
				
			||||||
 | 
					  width: 100%;
 | 
				
			||||||
 | 
					  max-width: 450px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#chatcontent img.attachment {
 | 
					#chatcontent img.attachment {
 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
  max-width: 300px;
 | 
					  max-width: 300px;
 | 
				
			||||||
@@ -795,6 +800,11 @@ p.mentioned span.chatmessage {
 | 
				
			|||||||
  max-height: none;
 | 
					  max-height: none;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#chatcontent .player {
 | 
				
			||||||
 | 
					  width: 100%;
 | 
				
			||||||
 | 
					  max-width: 400px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.wdt-emoji-popup {
 | 
					.wdt-emoji-popup {
 | 
				
			||||||
  position: fixed;
 | 
					  position: fixed;
 | 
				
			||||||
  bottom: 5%;
 | 
					  bottom: 5%;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -962,6 +962,8 @@
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
            if (message.attachments[i].url.endsWith(".png") || message.attachments[i].url.endsWith(".jpg") || message.attachments[i].url.endsWith(".jpeg") || message.attachments[i].url.endsWith(".gif")) {
 | 
					            if (message.attachments[i].url.endsWith(".png") || message.attachments[i].url.endsWith(".jpg") || message.attachments[i].url.endsWith(".jpeg") || message.attachments[i].url.endsWith(".gif")) {
 | 
				
			||||||
                attach += "<img class=\"attachment materialboxed\" src=\"" + message.attachments[i].url + "\">";
 | 
					                attach += "<img class=\"attachment materialboxed\" src=\"" + message.attachments[i].url + "\">";
 | 
				
			||||||
 | 
					            } else if (message.attachments[i].url.endsWith(".mp4")) {
 | 
				
			||||||
 | 
					                attach += "<video class=\"player\" src=\"" + message.attachments[i].url + "\" frameborder=\"0\" allow=\"encrypted-media\" allowfullscreen controls preload poster=\"" + message.attachments[i].proxy_url + "?format=png\"></video>";
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                attach += message.attachments[i].url;
 | 
					                attach += message.attachments[i].url;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -415,7 +415,14 @@
 | 
				
			|||||||
              {{/description}}
 | 
					              {{/description}}
 | 
				
			||||||
              {{/isVideo}}
 | 
					              {{/isVideo}}
 | 
				
			||||||
              {{#isVideo}}
 | 
					              {{#isVideo}}
 | 
				
			||||||
              <iframe class="video" src="{{video.url}}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
 | 
					              <div class="video">
 | 
				
			||||||
 | 
					                {{#video.proxy_url}}
 | 
				
			||||||
 | 
					                <video class="player" src="{{video.url}}" frameborder="0" allow="encrypted-media" allowfullscreen controls preload poster="{{thumbnail.proxy_url}}"></video>
 | 
				
			||||||
 | 
					                {{/video.proxy_url}}
 | 
				
			||||||
 | 
					                {{^video.proxy_url}}
 | 
				
			||||||
 | 
					                <iframe class="player" src="{{video.url}}" frameborder="0" allow="encrypted-media" allowfullscreen></iframe>
 | 
				
			||||||
 | 
					                {{/video.proxy_url}}
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
              {{/isVideo}}
 | 
					              {{/isVideo}}
 | 
				
			||||||
              {{#fields.length}}
 | 
					              {{#fields.length}}
 | 
				
			||||||
              <div class="fields">
 | 
					              <div class="fields">
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user