Skip to content

Commit

Permalink
Add mp4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Eggbertx committed Mar 24, 2021
1 parent d5a5fc5 commit 8ccd217
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 8,500 deletions.
7,731 changes: 25 additions & 7,706 deletions frontend/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions frontend/src/postutil.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let movablePostPreviews = null;
let expandablePostrefs = true;

let videoTestRE = /\.(mp4)|(webm)$/;
function deleteCheckedPosts() {
if(confirm('Are you sure you want to delete these posts?') == true) {
let form = $("form#main-form");
Expand Down Expand Up @@ -117,8 +117,8 @@ export function prepareThumbnails() {
thumb.removeAttr("width").removeAttr("height");

var fileInfoElement = a.prevAll(".file-info:first");

if((thumbURL+uploadURL).indexOf(".webm") > 0) {
if(videoTestRE.test(thumbURL + uploadURL)) {
// Upload is a video
thumb.hide();
var video = $("<video />")
Expand Down

0 comments on commit 8ccd217

Please sign in to comment.