@videosdk.live/react-sdk 0.1.67 → 0.1.68

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/README.md CHANGED
@@ -37,7 +37,7 @@
37
37
  Visit our official guide for [Browser Support](https://docs.videosdk.live/docs/realtime-communication/see-also/device-browser-support)
38
38
 
39
39
  ## Demo App
40
- Check out demo [here](https://videosdk.live/prebuilt/)
40
+ Check out demo [here](https://demo.videosdk.live/conference-meeting/)
41
41
 
42
42
  ## Prerequisites
43
43
 
@@ -80,7 +80,7 @@ import {
80
80
 
81
81
  ## Documentation
82
82
 
83
- Check the components and their usage in our [documentation](https://docs.videosdk.live/react/guide/video-and-audio-calling-api-sdk/getting-started).
83
+ Check the components and their usage in our [documentation](https://docs.videosdk.live/react/guide/video-and-audio-calling-api-sdk/concept-and-architecture).
84
84
 
85
85
  ## Quick Start
86
86
 
package/dist/index.js CHANGED
@@ -33,6 +33,7 @@ var events = {
33
33
  'hls-started': eventPrifix + "-hls-started",
34
34
  'hls-stopped': eventPrifix + "-hls-stopped",
35
35
  'hls-state-changed': eventPrifix + "-hls-state-changed",
36
+ 'hls-playable-state-changed': eventPrifix + "-hls-playable-state-changed",
36
37
  'recording-state-changed': eventPrifix + "-recording-state-changed",
37
38
  'livestream-state-changed': eventPrifix + "-livestream-state-changed",
38
39
  'meeting-state-changed': eventPrifix + "-meeting-state-changed",
@@ -299,7 +300,7 @@ var MeetingConsumer = function MeetingConsumer(_ref2) {
299
300
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(MeetingProviderContex.Consumer, null, children));
300
301
  };
301
302
 
302
- var version = "0.1.66";
303
+ var version = "0.1.67";
303
304
 
304
305
  var MeetingProvider = function MeetingProvider(_ref) {
305
306
  var children = _ref.children,
@@ -356,15 +357,22 @@ var MeetingProvider = function MeetingProvider(_ref) {
356
357
  var _useState16 = React.useState(false),
357
358
  isHls = _useState16[0],
358
359
  setIsHls = _useState16[1];
359
- var _useState17 = React.useState(null),
360
+ var _useState17 = React.useState('RECORDING_STOPPED'),
360
361
  recordingState = _useState17[0],
361
362
  setRecordingState = _useState17[1];
362
- var _useState18 = React.useState(null),
363
+ var _useState18 = React.useState('LIVESTREAM_STOPPED'),
363
364
  livestreamState = _useState18[0],
364
365
  setLivestreamState = _useState18[1];
365
- var _useState19 = React.useState(null),
366
+ var _useState19 = React.useState('HLS_STOPPED'),
366
367
  hlsState = _useState19[0],
367
368
  setHlsState = _useState19[1];
369
+ var _useState20 = React.useState({
370
+ downstreamUrl: null,
371
+ playbackHlsUrl: null,
372
+ livestreamUrl: null
373
+ }),
374
+ hlsUrls = _useState20[0],
375
+ setHlsUrls = _useState20[1];
368
376
  var meetingRef = React.useRef();
369
377
  var localMicOnRef = React.useRef();
370
378
  var localWebcamOnRef = React.useRef();
@@ -418,9 +426,14 @@ var MeetingProvider = function MeetingProvider(_ref) {
418
426
  setConnections(new Map());
419
427
  setIsMeetingJoined(false);
420
428
  setIsHls(false);
421
- setRecordingState(null);
422
- setLivestreamState(null);
423
- setHlsState(null);
429
+ setRecordingState('RECORDING_STOPPED');
430
+ setLivestreamState('LIVESTREAM_STOPPED');
431
+ setHlsState('HLS_STOPPED');
432
+ setHlsUrls({
433
+ downstreamUrl: null,
434
+ playbackHlsUrl: null,
435
+ livestreamUrl: null
436
+ });
424
437
  };
425
438
  var _handle_participant_joined = function _handle_participant_joined(participant) {
426
439
  setParticipants(function (participants) {
@@ -621,6 +634,19 @@ var MeetingProvider = function MeetingProvider(_ref) {
621
634
  };
622
635
  var _handle_hls_state_changed = function _handle_hls_state_changed(data) {
623
636
  setHlsState(data === null || data === void 0 ? void 0 : data.status);
637
+ if ((data === null || data === void 0 ? void 0 : data.status) == 'HLS_PLAYABLE') {
638
+ setHlsUrls({
639
+ downstreamUrl: data === null || data === void 0 ? void 0 : data.downstreamUrl,
640
+ playbackHlsUrl: data === null || data === void 0 ? void 0 : data.playbackHlsUrl,
641
+ livestreamUrl: data === null || data === void 0 ? void 0 : data.livestreamUrl
642
+ });
643
+ } else if ((data === null || data === void 0 ? void 0 : data.status) == 'HLS_STOPPED') {
644
+ setHlsUrls({
645
+ downstreamUrl: null,
646
+ playbackHlsUrl: null,
647
+ livestreamUrl: null
648
+ });
649
+ }
624
650
  eventEmitter.emit(events['hls-state-changed'], data);
625
651
  };
626
652
  var _handle_meeting_state_changed = function _handle_meeting_state_changed(data) {
@@ -970,6 +996,7 @@ var MeetingProvider = function MeetingProvider(_ref) {
970
996
  recordingState: recordingState,
971
997
  livestreamState: livestreamState,
972
998
  hlsState: hlsState,
999
+ hlsUrls: hlsUrls,
973
1000
  isMeetingJoined: isMeetingJoined,
974
1001
  join: join,
975
1002
  leave: leave,
@@ -1172,6 +1199,9 @@ var useParticipant = function useParticipant(participantId, _temp) {
1172
1199
  var unpin = function unpin(data) {
1173
1200
  participant === null || participant === void 0 ? void 0 : participant.unpin(data);
1174
1201
  };
1202
+ var remove = function remove() {
1203
+ participant === null || participant === void 0 ? void 0 : participant.remove();
1204
+ };
1175
1205
  var getAudioStats = function getAudioStats() {
1176
1206
  return Promise.resolve(participant === null || participant === void 0 ? void 0 : participant.getAudioStats());
1177
1207
  };
@@ -1249,6 +1279,7 @@ var useParticipant = function useParticipant(participantId, _temp) {
1249
1279
  disableWebcam: disableWebcam,
1250
1280
  pin: pin,
1251
1281
  unpin: unpin,
1282
+ remove: remove,
1252
1283
  switchTo: switchTo,
1253
1284
  getAudioStats: getAudioStats,
1254
1285
  getVideoStats: getVideoStats,