@videosdk.live/react-sdk 0.1.77 → 0.1.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -300,7 +300,7 @@ var MeetingConsumer = function MeetingConsumer(_ref2) {
300
300
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(MeetingProviderContex.Consumer, null, children));
301
301
  };
302
302
 
303
- var version = "0.1.77";
303
+ var version = "0.1.79";
304
304
 
305
305
  var MeetingProvider = function MeetingProvider(_ref) {
306
306
  var children = _ref.children,
@@ -1205,6 +1205,14 @@ var useParticipant = function useParticipant(participantId, _temp) {
1205
1205
  var remove = function remove() {
1206
1206
  participant === null || participant === void 0 ? void 0 : participant.remove();
1207
1207
  };
1208
+ var captureImage = function captureImage(_ref2) {
1209
+ var height = _ref2.height,
1210
+ width = _ref2.width;
1211
+ return Promise.resolve(participant === null || participant === void 0 ? void 0 : participant.captureImage({
1212
+ height: height,
1213
+ width: width
1214
+ }));
1215
+ };
1208
1216
  var getAudioStats = function getAudioStats() {
1209
1217
  return Promise.resolve(participant === null || participant === void 0 ? void 0 : participant.getAudioStats());
1210
1218
  };
@@ -1265,6 +1273,7 @@ var useParticipant = function useParticipant(participantId, _temp) {
1265
1273
  webcamOn: webcamOn || !!webcamStream,
1266
1274
  micOn: micOn || !!micStream,
1267
1275
  mode: mode,
1276
+ metaData: participant === null || participant === void 0 ? void 0 : participant.metaData,
1268
1277
  screenShareOn: !!screenShareStream,
1269
1278
  isLocal: (localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.id) === participantId,
1270
1279
  isActiveSpeaker: activeSpeakerId === participantId,
@@ -1280,6 +1289,7 @@ var useParticipant = function useParticipant(participantId, _temp) {
1280
1289
  disableMic: disableMic,
1281
1290
  enableWebcam: enableWebcam,
1282
1291
  disableWebcam: disableWebcam,
1292
+ captureImage: captureImage,
1283
1293
  pin: pin,
1284
1294
  unpin: unpin,
1285
1295
  remove: remove,
@@ -1376,9 +1386,9 @@ var usePubSub = function usePubSub(topic, _temp) {
1376
1386
  messages = _useState[0],
1377
1387
  setMessages = _useState[1];
1378
1388
  var isSubscribed = React.useRef(false);
1379
- var publish = function publish(message, options) {
1389
+ var publish = function publish(message, options, payload) {
1380
1390
  if (meeting) {
1381
- meeting.pubSub.publish(topic, message, options);
1391
+ meeting.pubSub.publish(topic, message, options, payload);
1382
1392
  }
1383
1393
  };
1384
1394
  var _handlePubSub = function _handlePubSub(data) {
@@ -1416,6 +1426,40 @@ var usePubSub = function usePubSub(topic, _temp) {
1416
1426
  };
1417
1427
  };
1418
1428
 
1429
+ var useFile = function useFile() {
1430
+ var mMeeting = useMeeting();
1431
+ var uploadBase64File = function uploadBase64File(_ref) {
1432
+ var base64Data = _ref.base64Data,
1433
+ token = _ref.token,
1434
+ fileName = _ref.fileName;
1435
+ try {
1436
+ return Promise.resolve(mMeeting.meeting.uploadBase64File({
1437
+ base64Data: base64Data,
1438
+ token: token,
1439
+ fileName: fileName
1440
+ }));
1441
+ } catch (e) {
1442
+ return Promise.reject(e);
1443
+ }
1444
+ };
1445
+ var fetchBase64File = function fetchBase64File(_ref2) {
1446
+ var url = _ref2.url,
1447
+ token = _ref2.token;
1448
+ try {
1449
+ return Promise.resolve(mMeeting.meeting.fetchBase64File({
1450
+ url: url,
1451
+ token: token
1452
+ }));
1453
+ } catch (e) {
1454
+ return Promise.reject(e);
1455
+ }
1456
+ };
1457
+ return {
1458
+ uploadBase64File: uploadBase64File,
1459
+ fetchBase64File: fetchBase64File
1460
+ };
1461
+ };
1462
+
1419
1463
  var Constants = jsSdk.VideoSDK.Constants;
1420
1464
  var createCameraVideoTrack = function createCameraVideoTrack(_ref) {
1421
1465
  var _ref$cameraId = _ref.cameraId,
@@ -1482,6 +1526,7 @@ exports.createCameraVideoTrack = createCameraVideoTrack;
1482
1526
  exports.createMicrophoneAudioTrack = createMicrophoneAudioTrack;
1483
1527
  exports.createScreenShareVideoTrack = createScreenShareVideoTrack;
1484
1528
  exports.useConnection = useConnection;
1529
+ exports.useFile = useFile;
1485
1530
  exports.useMeeting = useMeeting;
1486
1531
  exports.useParticipant = useParticipant;
1487
1532
  exports.usePubSub = usePubSub;