@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.
@@ -297,7 +297,7 @@ var MeetingConsumer = function MeetingConsumer(_ref2) {
297
297
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MeetingProviderContex.Consumer, null, children));
298
298
  };
299
299
 
300
- var version = "0.1.77";
300
+ var version = "0.1.79";
301
301
 
302
302
  var MeetingProvider = function MeetingProvider(_ref) {
303
303
  var children = _ref.children,
@@ -1202,6 +1202,14 @@ var useParticipant = function useParticipant(participantId, _temp) {
1202
1202
  var remove = function remove() {
1203
1203
  participant === null || participant === void 0 ? void 0 : participant.remove();
1204
1204
  };
1205
+ var captureImage = function captureImage(_ref2) {
1206
+ var height = _ref2.height,
1207
+ width = _ref2.width;
1208
+ return Promise.resolve(participant === null || participant === void 0 ? void 0 : participant.captureImage({
1209
+ height: height,
1210
+ width: width
1211
+ }));
1212
+ };
1205
1213
  var getAudioStats = function getAudioStats() {
1206
1214
  return Promise.resolve(participant === null || participant === void 0 ? void 0 : participant.getAudioStats());
1207
1215
  };
@@ -1262,6 +1270,7 @@ var useParticipant = function useParticipant(participantId, _temp) {
1262
1270
  webcamOn: webcamOn || !!webcamStream,
1263
1271
  micOn: micOn || !!micStream,
1264
1272
  mode: mode,
1273
+ metaData: participant === null || participant === void 0 ? void 0 : participant.metaData,
1265
1274
  screenShareOn: !!screenShareStream,
1266
1275
  isLocal: (localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.id) === participantId,
1267
1276
  isActiveSpeaker: activeSpeakerId === participantId,
@@ -1277,6 +1286,7 @@ var useParticipant = function useParticipant(participantId, _temp) {
1277
1286
  disableMic: disableMic,
1278
1287
  enableWebcam: enableWebcam,
1279
1288
  disableWebcam: disableWebcam,
1289
+ captureImage: captureImage,
1280
1290
  pin: pin,
1281
1291
  unpin: unpin,
1282
1292
  remove: remove,
@@ -1373,9 +1383,9 @@ var usePubSub = function usePubSub(topic, _temp) {
1373
1383
  messages = _useState[0],
1374
1384
  setMessages = _useState[1];
1375
1385
  var isSubscribed = useRef(false);
1376
- var publish = function publish(message, options) {
1386
+ var publish = function publish(message, options, payload) {
1377
1387
  if (meeting) {
1378
- meeting.pubSub.publish(topic, message, options);
1388
+ meeting.pubSub.publish(topic, message, options, payload);
1379
1389
  }
1380
1390
  };
1381
1391
  var _handlePubSub = function _handlePubSub(data) {
@@ -1413,6 +1423,40 @@ var usePubSub = function usePubSub(topic, _temp) {
1413
1423
  };
1414
1424
  };
1415
1425
 
1426
+ var useFile = function useFile() {
1427
+ var mMeeting = useMeeting();
1428
+ var uploadBase64File = function uploadBase64File(_ref) {
1429
+ var base64Data = _ref.base64Data,
1430
+ token = _ref.token,
1431
+ fileName = _ref.fileName;
1432
+ try {
1433
+ return Promise.resolve(mMeeting.meeting.uploadBase64File({
1434
+ base64Data: base64Data,
1435
+ token: token,
1436
+ fileName: fileName
1437
+ }));
1438
+ } catch (e) {
1439
+ return Promise.reject(e);
1440
+ }
1441
+ };
1442
+ var fetchBase64File = function fetchBase64File(_ref2) {
1443
+ var url = _ref2.url,
1444
+ token = _ref2.token;
1445
+ try {
1446
+ return Promise.resolve(mMeeting.meeting.fetchBase64File({
1447
+ url: url,
1448
+ token: token
1449
+ }));
1450
+ } catch (e) {
1451
+ return Promise.reject(e);
1452
+ }
1453
+ };
1454
+ return {
1455
+ uploadBase64File: uploadBase64File,
1456
+ fetchBase64File: fetchBase64File
1457
+ };
1458
+ };
1459
+
1416
1460
  var Constants = VideoSDK.Constants;
1417
1461
  var createCameraVideoTrack = function createCameraVideoTrack(_ref) {
1418
1462
  var _ref$cameraId = _ref.cameraId,
@@ -1472,5 +1516,5 @@ var createMicrophoneAudioTrack = function createMicrophoneAudioTrack(_ref3) {
1472
1516
  }
1473
1517
  };
1474
1518
 
1475
- export { Constants, MeetingConsumer, MeetingProvider, createCameraVideoTrack, createMicrophoneAudioTrack, createScreenShareVideoTrack, useConnection, useMeeting, useParticipant, usePubSub };
1519
+ export { Constants, MeetingConsumer, MeetingProvider, createCameraVideoTrack, createMicrophoneAudioTrack, createScreenShareVideoTrack, useConnection, useFile, useMeeting, useParticipant, usePubSub };
1476
1520
  //# sourceMappingURL=index.modern.js.map