Fix 'corrupt video' error when posting .webm from Safari.
This commit is contained in:
parent
f5c7779d33
commit
50aebd3ddd
@ -207,6 +207,8 @@ QR.post = class
|
|||||||
readFile: ->
|
readFile: ->
|
||||||
isVideo = /^video\//.test @file.type
|
isVideo = /^video\//.test @file.type
|
||||||
el = $.el(if isVideo then 'video' else 'img')
|
el = $.el(if isVideo then 'video' else 'img')
|
||||||
|
return if isVideo and !el.canPlayType @file.type
|
||||||
|
|
||||||
event = if isVideo then 'loadeddata' else 'load'
|
event = if isVideo then 'loadeddata' else 'load'
|
||||||
onload = =>
|
onload = =>
|
||||||
$.off el, event, onload
|
$.off el, event, onload
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user