From 0a81b43f1df395d5b002f490d99826e624a74ec1 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 13 Feb 2019 10:15:18 +0100 Subject: [PATCH] startStreaming should always return a map --- platypush/backend/http/static/js/media.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platypush/backend/http/static/js/media.js b/platypush/backend/http/static/js/media.js index 332d2fab77..481ea9a3c6 100644 --- a/platypush/backend/http/static/js/media.js +++ b/platypush/backend/http/static/js/media.js @@ -135,7 +135,7 @@ $(document).ready(function() { if (media.startsWith('magnet:?')) { return new Promise((resolve, reject) => { startStreamingTorrent(media) - .then((url) => { resolve(url); }) + .then((url) => { resolve({'url':url}); }) .catch((error) => { reject(error); }); }); } @@ -241,8 +241,8 @@ $(document).ready(function() { }, }; - startStreaming(resource, subtitles).then((url) => { - requestArgs.args.resource = url; + startStreaming(resource, subtitles).then((response) => { + requestArgs.args.resource = response.url; // XXX subtitles currently break the Chromecast playback, // see https://github.com/balloob/pychromecast/issues/74 // if (response.subtitles) {