JavaScript SDK of QuickBlox cloud backend platform
OTHER License
Bot releases are hidden (Show)
Published by dimaspirit over 6 years ago
Removed:
Fixed:
Added:
chatReconnectionTimeInterval
to config, by default is 5 sec;QB.chat.disconnect()
stops reconnection actions;QB.chat.connect(params, callback)
when chat is in connecting state (the connection one by one) was blocked, the callback funtion will return an error ('Status.REJECT - The connection is still in the Status.CONNECTING state');QB.webrtc.onDevicesChangeListener()
was added - the listener that is called when a media device has been plugged or unplugged;webRTCSession.switchMediaTracks(deviceIds, cb)
.Here is code snippet how to replace audio/video tracks:
var switchMediaTracksBtn = document.getElementById('confirmSwitchMediaTracks');
var webRTCSession = QB.webrtc.createNewSession(params);
QB.webrtc.getMediaDevices('videoinput').then(function(devices) {
var selectVideoInput = document.createElement('select'),
selectVideoInput.id = 'videoInput',
someDocumentElement.appendChild(selectVideoInput);
if (devices.length > 1) {
for (var i = 0; i !== devices.length; ++i) {
var device = devices[i],
option = document.createElement('option');
if (device.kind === 'videoinput') {
option.value = device.deviceId;
option.text = device.label;
selectVideoInput.appendChild(option);
}
}
}
}).catch(function(error) {
console.error(error);
});
QB.webrtc.getMediaDevices('audioinput').then(function(devices) {
var selectAudioInput = document.createElement('select'),
selectAudioInput.id = 'audioInput',
someDocumentElement.appendChild(selectAudioInput);
if (devices.length > 1) {
for (var i = 0; i !== devices.length; ++i) {
var device = devices[i],
option = document.createElement('option');
if (device.kind === 'audioinput') {
option.value = device.deviceId;
option.text = device.label;
selectAudioInput.appendChild(option);
}
}
}
}).catch(function(error) {
console.error(error);
});
switchMediaTracksBtn.onclick = function(event) {
var audioDeviceId = document.getElementById('audioInput').value || undefined,
videoDeviceId = document.getElementById('videoInput').value || undefined,
deviceIds = {
audio: audioDeviceId,
video: videoDeviceId,
};
var callback = function(error, stream) {
if (err) {
console.error(error);
} else {
console.log(stream);
}
};
// Switch media tracks in audio/video HTML's element (the local stream)
// replace media tracks in peers (will change media tracks for each user in WebRTC session)
webRTCSession.switchMediaTracks(deviceIds, callback);
}
Published by dimaspirit over 6 years ago
New:
Updated:
Encode body of all API requests;
Encode based on this https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters;
Rework muc.join
method:
jid
or id
of a dialog;QB.chat.muc.join(dialogId, function(error, response) {
if(error) {
console.log('Error is null when all is Ok');
}
console.log(`response.dialogId` is always contains in response);
});
stats = {
local: {
audio: {
bitrate: 71, // kilobits per second (kbps)
bytesSent: 226410,
packetsSent: 1250,
timestamp: 1522680935736
},
video: {
frameHeight: 480,
frameWidth: 640,
framesPerSecond: 25.8,
bitrate: 498, // kilobits per second (kbps)
bytesSent: 1438862,
packetsSent: 1498,
timestamp: 1522680935736
},
candidate: {
protocol: "udp"
ip: "192.168.1.179"
port: 51038
}
},
remote: {
audio: {
bitrate: 47, // kilobits per second (kbps)
bytesReceived: 148211,
packetsReceived: 1250,
timestamp: 1522680935736
},
video: {
frameHeight: 480,
frameWidth: 640,
framesPerSecond: 30.4,
bitrate: 533, // kilobits per second (kbps)
bytesReceived: 1663716,
packetsReceived: 1498,
timestamp: 1522680935736
},
candidate: {
protocol: "udp",
ip: "192.168.1.179",
port: 51908
}
}
}
Published by dimaspirit over 6 years ago
Improvements / Updated:
hash
property to config;var CONFIG = {
debug: {mode: 1},
hash: 'sha256'
};
QB.init(3477, 'ChRnwEJ3WzxH9O4', 'AS546kpUQ2tfbvv', CONFIG);
Published by dimaspirit over 6 years ago
Added:
Add possibility to set a bandwidth limit for the video call.
Set the bandwidth at create sssion by QB.webrtc.createNewSession(calleesIds, sessionType, callerID, { bandwidth: Number });
.
Add DELETE Custom Object by criteria by updated a method QB.data.delete.
Now the method takes QB.data.delete(className, {string|array|object}, callback)
where second parameter an id (String) or a list of ids (Array) or criteria rules (Object) to delete.
Check out docs for more details;
Updated:
Normalize an answer on DELETE Custom Object by criteria for any passed types.
Check out docs for more details;
Update QB.webrtc.onCallStatsReport(session, userId, stats, error) listener;
Samples:
Add ability set credentials and endpoints by search param of URL in webRTC sample:
https//:www.host.com/?appId={Number}&authKey={String}&authSecret={String}&endpoints.api={String}&endpoints.chat={String}
.
Also remove production configuration/app and leave stage app configuration;
Add a bandwidth configuration to WebRTC sample;
Remove code for "Hack for Firefox" (https://bugzilla.mozilla.org/show_bug.cgi?id=852665) cause we are support FF52+ now;
Published by Vladlukhanin over 6 years ago
Fixed:
Samples:
Published by dimaspirit almost 7 years ago
Improvements:
Add:
Fixed:
Published by Vladlukhanin almost 7 years ago
Added:
QB.chat.getLastUserActivity(userId) - to send query;
QB.chat.onLastUserActivityListener(userId, seconds) - get last user activity;
Updated:
Removed:
Samples:
Published by dimaspirit about 7 years ago
Added:
Imporvements:
Fixed:
Removed:
Published by dimaspirit about 7 years ago
Deprecated:
Fixed:
Improvement:
Published by dimaspirit over 7 years ago
new callback onKickOccupant(dialogId, initiatorUserId)
to handle a case where User2 joined chat dialog and User1 removed him from occupants;
new callbacks onJoinOccupant(dialogId, userId)
and onLeaveOccupant(dialogId, userId)
to handle group dialog changes;
new task npm run buildNotMinified
;
Karma/Istanbul code coverage tools. To start use the following comand: node node_modules/.bin/karma start karma.conf.js
. To see a report look at subdirectory coverage in the default location.
Warning! Before run you need to rebuild sdk with buildNotMinified
task;
Published by dimaspirit over 7 years ago
new callback onKickOccupant(dialogId, initiatorUserId)
to handle a case where User2 joined chat dialog and User1 removed him from occupants;
new callbacks onJoinOccupant(dialogId, userId)
and onLeaveOccupant(dialogId, userId)
to handle group dialog changes;
new task npm run buildNotMinified
;
Karma/Istanbul code coverage tools. To start use the following comand: node node_modules/.bin/karma start karma.conf.js
. To see a report look at subdirectory coverage in the default location.
Warning! Before run you need to rebuild sdk with buildNotMinified
task;
Published by dimaspirit over 7 years ago
Remove:
New:
Fixed:
Published by dimaspirit over 7 years ago
Patch with minified quickblox.min.js;
Nothing changed;
Published by dimaspirit over 7 years ago
New:
// @example
QB.chat.connect({
userId: user.id,
password: user.pass,
connectWithoutGettingRoster: true
}, function(err) {});
Fixed:
Samples:
Published by dimaspirit almost 8 years ago
New:
Update:
Remove / Deprecated:
Fixed:
Published by dimaspirit almost 8 years ago
New:
npm run build
);Updated:
Published by dimaspirit almost 8 years ago
Features:
Published by Vladlukhanin about 8 years ago
Updated:
Published by Vladlukhanin about 8 years ago
Updated:
Published by Vladlukhanin about 8 years ago
Fixed: