code: function deferred(mediaObject, params, prevRpc, callback) {
    var promises = [];
  
    if (mediaObject != undefined)
      promises.push(mediaObject);
  
    for (var key in params) {
      var param = params[key];
      if (param !== undefined)
        promises.push(param);
    };
  
    if (prevRpc != undefined)
      promises.push(prevRpc);
  
    return promiseCallback(Promise.all(promises), callback);
  }
docs: @function module:kurentoClient.KurentoClient~deferred
  
  @param {module:core/abstracts.MediaObject} mediaObject
  @param {external:Object} params
  @param {external:Promise} prevRpc
  @param {external:Function} callback
  
  @return {external:Promise}