Merge branch 'master' into develop

pull/21833/head
Bruno Windels 2018-10-08 17:09:59 +02:00
commit 864c80c6ca
3 changed files with 25 additions and 9 deletions

View File

@ -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)

View File

@ -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": {

View File

@ -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);
};
reader.readAsDataURL(videoFile);
// We don't use readAsDataURL because massive files and b64 don't mix.
video.src = URL.createObjectURL(videoFile);
return deferred.promise;
}