proxy-polyfill still doesn't seem to work. Added file_set_status to lbry.js

This commit is contained in:
Akinwale Ariwodola 2018-03-29 20:00:20 +01:00
parent ab452de347
commit 315e8702c0
2 changed files with 15 additions and 7 deletions

View file

@ -167,6 +167,7 @@ var LOADING_VIDEO_FAILED = exports.LOADING_VIDEO_FAILED = 'LOADING_VIDEO_FAILED'
var DOWNLOADING_STARTED = exports.DOWNLOADING_STARTED = 'DOWNLOADING_STARTED';
var DOWNLOADING_PROGRESSED = exports.DOWNLOADING_PROGRESSED = 'DOWNLOADING_PROGRESSED';
var DOWNLOADING_COMPLETED = exports.DOWNLOADING_COMPLETED = 'DOWNLOADING_COMPLETED';
var DOWNLOADING_CANCELED = exports.DOWNLOADING_CANCELED = 'DOWNLOADING_CANCELED';
var PLAY_VIDEO_STARTED = exports.PLAY_VIDEO_STARTED = 'PLAY_VIDEO_STARTED';
var FETCH_AVAILABILITY_STARTED = exports.FETCH_AVAILABILITY_STARTED = 'FETCH_AVAILABILITY_STARTED';
var FETCH_AVAILABILITY_COMPLETED = exports.FETCH_AVAILABILITY_COMPLETED = 'FETCH_AVAILABILITY_COMPLETED';
@ -1047,6 +1048,13 @@ Lbry.file_delete = function () {
});
};
Lbry.file_set_status = function () {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return new Promise(function (resolve, reject) {
apiCall('file_set_status', params, resolve, reject);
});
};
Lbry.connectPromise = null;
Lbry.connect = function () {
if (Lbry.connectPromise === null) {

View file

@ -143,15 +143,15 @@ Lbry.status = () =>
reject
);
});
Lbry.file_delete = (params = {}) =>
new Promise((resolve, reject) => {
apiCall(
'file_delete',
params,
resolve,
reject
);
apiCall('file_delete', params, resolve, reject);
});
Lbry.file_set_status = (params = {}) =>
new Promise((resolve, reject) => {
apiCall('file_set_status', params, resolve, reject);
});
Lbry.connectPromise = null;