diff --git a/CHANGELOG.md b/CHANGELOG.md index d007be0f4b..a52034d305 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +Changes in [0.13.6](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.13.6) (2018-10-08) +===================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.13.5...v0.13.6) + + * Fix resuming session in Firefox private mode/Tor browser being broken + [\#2195](https://github.com/matrix-org/matrix-react-sdk/pull/2195) + * Show warning about using lazy-loading/non-lazy-loading versions simultaneously (/app & /develop) + [\#2201](https://github.com/matrix-org/matrix-react-sdk/pull/2201) + Changes in [0.13.5](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.13.5) (2018-10-01) ===================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.13.5-rc.1...v0.13.5) diff --git a/package.json b/package.json index 72481f2e3c..dbb034c593 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "0.13.5", + "version": "0.13.6", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { diff --git a/src/ContentMessages.js b/src/ContentMessages.js index a0bf75bccf..fd21977108 100644 --- a/src/ContentMessages.js +++ b/src/ContentMessages.js @@ -153,17 +153,24 @@ function loadVideoElement(videoFile) { // Load the file into an html element const video = document.createElement("video"); - // Wait until we have enough data to thumbnail the first frame. - video.onloadeddata = function() { - URL.revokeObjectURL(video.src); - deferred.resolve(video); + const reader = new FileReader(); + reader.onload = function(e) { + video.src = e.target.result; + + // Once ready, returns its size + // Wait until we have enough data to thumbnail the first frame. + video.onloadeddata = function() { + deferred.resolve(video); + }; + video.onerror = function(e) { + deferred.reject(e); + }; }; - video.onerror = function(e) { + reader.onerror = function(e) { deferred.reject(e); }; - - // We don't use readAsDataURL because massive files and b64 don't mix. - video.src = URL.createObjectURL(videoFile); + reader.readAsDataURL(videoFile); + return deferred.promise; }