From 50aebd3ddd3b1794e8e6cb04b904a102712fad50 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 5 Jul 2015 03:16:14 -0700 Subject: [PATCH] Fix 'corrupt video' error when posting .webm from Safari. --- src/Posting/QR.post.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Posting/QR.post.coffee b/src/Posting/QR.post.coffee index 4522d4d8f..266560924 100644 --- a/src/Posting/QR.post.coffee +++ b/src/Posting/QR.post.coffee @@ -207,6 +207,8 @@ QR.post = class readFile: -> isVideo = /^video\//.test @file.type el = $.el(if isVideo then 'video' else 'img') + return if isVideo and !el.canPlayType @file.type + event = if isVideo then 'loadeddata' else 'load' onload = => $.off el, event, onload