From 1cc74ec116e8299a64832ba8563e428a08b47cf1 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 31 Aug 2016 20:57:08 +0100 Subject: [PATCH] don't break the promise chain if a play() fails --- lib/webrtc/call.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/webrtc/call.js b/lib/webrtc/call.js index b42ba3c0d..024bdc616 100644 --- a/lib/webrtc/call.js +++ b/lib/webrtc/call.js @@ -157,11 +157,21 @@ MatrixCall.prototype.placeScreenSharingCall = * @param {string} queueId Arbitrary ID to track the chain of promises to be used */ MatrixCall.prototype.playElement = function(element, queueId) { + console.log("queuing play on " + queueId + " and element " + element); // XXX: FIXME: Does this leak elements, given the old promises // may hang around and retain a reference to them? if (this.mediaPromises[queueId]) { + // XXX: these promises can fail (e.g. by