mediasoup-client
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -9,3 +9,8 @@ 'use strict'; | ||
exports.getDeviceInfo = getDeviceInfo; | ||
exports.checkCapabilitiesForRoom = checkCapabilitiesForRoom; | ||
var _ortc = require('./ortc'); | ||
var ortc = _interopRequireWildcard(_ortc); | ||
var _Device = require('./Device'); | ||
@@ -21,2 +26,4 @@ | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | ||
/** | ||
@@ -54,2 +61,23 @@ * Whether the current browser or device is supported. | ||
/** | ||
* Check whether this device/browser can send/receive audio/video in a room | ||
* whose RTP capabilities are given. | ||
* | ||
* @param {Object} Room RTP capabilities. | ||
* | ||
* @return {Promise} Resolves to an Object with 'audio' and 'video' Booleans. | ||
*/ | ||
function checkCapabilitiesForRoom(roomRtpCapabilities) { | ||
if (!_Device2.default.isSupported()) return Promise.reject(new Error('current browser/device not supported')); | ||
return _Device2.default.Handler.getNativeRtpCapabilities().then(function (nativeRtpCapabilities) { | ||
var extendedRtpCapabilities = ortc.getExtendedRtpCapabilities(nativeRtpCapabilities, roomRtpCapabilities); | ||
return { | ||
audio: ortc.canSend('audio', extendedRtpCapabilities), | ||
video: ortc.canSend('video', extendedRtpCapabilities) | ||
}; | ||
}); | ||
} | ||
/** | ||
* Expose the Room class. | ||
@@ -56,0 +84,0 @@ * |
{ | ||
"name": "mediasoup-client", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "mediasoup client side JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "author": "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
295446
7885
0