@videosdk.live/react-sdk
Advanced tools
Comparing version 0.1.49 to 0.1.50
@@ -35,2 +35,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
'hls-stopped': eventPrifix + "-hls-stopped", | ||
'hls-state-changed': eventPrifix + "-hls-state-changed", | ||
'recording-state-changed': eventPrifix + "-recording-state-changed", | ||
@@ -96,2 +97,4 @@ 'livestream-state-changed': eventPrifix + "-livestream-state-changed", | ||
onHlsStopped = _ref$onHlsStopped === void 0 ? function () {} : _ref$onHlsStopped, | ||
_ref$onHlsStateChange = _ref.onHlsStateChanged, | ||
onHlsStateChanged = _ref$onHlsStateChange === void 0 ? function () {} : _ref$onHlsStateChange, | ||
_ref$onRecordingState = _ref.onRecordingStateChanged, | ||
@@ -130,2 +133,3 @@ onRecordingStateChanged = _ref$onRecordingState === void 0 ? function () {} : _ref$onRecordingState, | ||
eventEmitter.on(events['hls-stopped'], onHlsStopped); | ||
eventEmitter.on(events['hls-state-changed'], onHlsStateChanged); | ||
eventEmitter.on(events['recording-state-changed'], onRecordingStateChanged); | ||
@@ -161,2 +165,3 @@ eventEmitter.on(events['livestream-state-changed'], onLivestreamStateChanged); | ||
eventEmitter.off(events['hls-stopped'], onHlsStopped); | ||
eventEmitter.off(events['hls-state-changed'], onHlsStateChanged); | ||
eventEmitter.off(events['recording-state-changed'], onRecordingStateChanged); | ||
@@ -220,2 +225,4 @@ eventEmitter.off(events['livestream-state-changed'], onLivestreamStateChanged); | ||
onHlsStopped = _ref2$onHlsStopped === void 0 ? function () {} : _ref2$onHlsStopped, | ||
_ref2$onHlsStateChang = _ref2.onHlsStateChanged, | ||
onHlsStateChanged = _ref2$onHlsStateChang === void 0 ? function () {} : _ref2$onHlsStateChang, | ||
_ref2$onRecordingStat = _ref2.onRecordingStateChanged, | ||
@@ -254,2 +261,3 @@ onRecordingStateChanged = _ref2$onRecordingStat === void 0 ? function () {} : _ref2$onRecordingStat, | ||
eventEmitter.on(events['hls-stopped'], onHlsStopped); | ||
eventEmitter.on(events['hls-state-changed'], onHlsStateChanged); | ||
eventEmitter.on(events['recording-state-changed'], onRecordingStateChanged); | ||
@@ -284,2 +292,3 @@ eventEmitter.on(events['livestream-state-changed'], onLivestreamStateChanged); | ||
eventEmitter.off(events['hls-stopped'], onHlsStopped); | ||
eventEmitter.off(events['hls-state-changed'], onHlsStateChanged); | ||
eventEmitter.off(events['recording-state-changed'], onRecordingStateChanged); | ||
@@ -292,3 +301,3 @@ eventEmitter.off(events['livestream-state-changed'], onLivestreamStateChanged); | ||
var version = "0.1.49"; | ||
var version = "0.1.50"; | ||
@@ -375,2 +384,6 @@ var MeetingProvider = function MeetingProvider(_ref) { | ||
var _useState19 = React.useState(null), | ||
hlsState = _useState19[0], | ||
setHlsState = _useState19[1]; | ||
var meetingRef = React.useRef(); | ||
@@ -432,2 +445,3 @@ var localMicOnRef = React.useRef(); | ||
setLivestreamState(null); | ||
setHlsState(null); | ||
}; | ||
@@ -597,2 +611,3 @@ | ||
meeting.off('livestream-state-changed', _handle_livestream_state_changed); | ||
meeting.off('hls-state-changed', _handle_hls_state_changed); | ||
} | ||
@@ -666,2 +681,7 @@ | ||
var _handle_hls_state_changed = function _handle_hls_state_changed(data) { | ||
setHlsState(data === null || data === void 0 ? void 0 : data.status); | ||
eventEmitter.emit(events['hls-state-changed'], data); | ||
}; | ||
var _handle_meeting_state_changed = function _handle_meeting_state_changed(data) { | ||
@@ -707,2 +727,3 @@ eventEmitter.emit(events['meeting-state-changed'], data); | ||
meeting.on('livestream-state-changed', _handle_livestream_state_changed); | ||
meeting.on('hls-state-changed', _handle_hls_state_changed); | ||
meeting.localParticipant.on('stream-enabled', _handle_localParticipant_stream_enabled); | ||
@@ -1060,2 +1081,3 @@ meeting.localParticipant.on('stream-disabled', _handle_localParticipant_stream_disabled); | ||
livestreamState: livestreamState, | ||
hlsState: hlsState, | ||
isMeetingJoined: isMeetingJoined, | ||
@@ -1062,0 +1084,0 @@ join: join, |
@@ -32,2 +32,3 @@ import React, { createContext, useEffect, useContext, useState, useRef, useMemo } from 'react'; | ||
'hls-stopped': eventPrifix + "-hls-stopped", | ||
'hls-state-changed': eventPrifix + "-hls-state-changed", | ||
'recording-state-changed': eventPrifix + "-recording-state-changed", | ||
@@ -93,2 +94,4 @@ 'livestream-state-changed': eventPrifix + "-livestream-state-changed", | ||
onHlsStopped = _ref$onHlsStopped === void 0 ? function () {} : _ref$onHlsStopped, | ||
_ref$onHlsStateChange = _ref.onHlsStateChanged, | ||
onHlsStateChanged = _ref$onHlsStateChange === void 0 ? function () {} : _ref$onHlsStateChange, | ||
_ref$onRecordingState = _ref.onRecordingStateChanged, | ||
@@ -127,2 +130,3 @@ onRecordingStateChanged = _ref$onRecordingState === void 0 ? function () {} : _ref$onRecordingState, | ||
eventEmitter.on(events['hls-stopped'], onHlsStopped); | ||
eventEmitter.on(events['hls-state-changed'], onHlsStateChanged); | ||
eventEmitter.on(events['recording-state-changed'], onRecordingStateChanged); | ||
@@ -158,2 +162,3 @@ eventEmitter.on(events['livestream-state-changed'], onLivestreamStateChanged); | ||
eventEmitter.off(events['hls-stopped'], onHlsStopped); | ||
eventEmitter.off(events['hls-state-changed'], onHlsStateChanged); | ||
eventEmitter.off(events['recording-state-changed'], onRecordingStateChanged); | ||
@@ -217,2 +222,4 @@ eventEmitter.off(events['livestream-state-changed'], onLivestreamStateChanged); | ||
onHlsStopped = _ref2$onHlsStopped === void 0 ? function () {} : _ref2$onHlsStopped, | ||
_ref2$onHlsStateChang = _ref2.onHlsStateChanged, | ||
onHlsStateChanged = _ref2$onHlsStateChang === void 0 ? function () {} : _ref2$onHlsStateChang, | ||
_ref2$onRecordingStat = _ref2.onRecordingStateChanged, | ||
@@ -251,2 +258,3 @@ onRecordingStateChanged = _ref2$onRecordingStat === void 0 ? function () {} : _ref2$onRecordingStat, | ||
eventEmitter.on(events['hls-stopped'], onHlsStopped); | ||
eventEmitter.on(events['hls-state-changed'], onHlsStateChanged); | ||
eventEmitter.on(events['recording-state-changed'], onRecordingStateChanged); | ||
@@ -281,2 +289,3 @@ eventEmitter.on(events['livestream-state-changed'], onLivestreamStateChanged); | ||
eventEmitter.off(events['hls-stopped'], onHlsStopped); | ||
eventEmitter.off(events['hls-state-changed'], onHlsStateChanged); | ||
eventEmitter.off(events['recording-state-changed'], onRecordingStateChanged); | ||
@@ -289,3 +298,3 @@ eventEmitter.off(events['livestream-state-changed'], onLivestreamStateChanged); | ||
var version = "0.1.49"; | ||
var version = "0.1.50"; | ||
@@ -372,2 +381,6 @@ var MeetingProvider = function MeetingProvider(_ref) { | ||
var _useState19 = useState(null), | ||
hlsState = _useState19[0], | ||
setHlsState = _useState19[1]; | ||
var meetingRef = useRef(); | ||
@@ -429,2 +442,3 @@ var localMicOnRef = useRef(); | ||
setLivestreamState(null); | ||
setHlsState(null); | ||
}; | ||
@@ -594,2 +608,3 @@ | ||
meeting.off('livestream-state-changed', _handle_livestream_state_changed); | ||
meeting.off('hls-state-changed', _handle_hls_state_changed); | ||
} | ||
@@ -663,2 +678,7 @@ | ||
var _handle_hls_state_changed = function _handle_hls_state_changed(data) { | ||
setHlsState(data === null || data === void 0 ? void 0 : data.status); | ||
eventEmitter.emit(events['hls-state-changed'], data); | ||
}; | ||
var _handle_meeting_state_changed = function _handle_meeting_state_changed(data) { | ||
@@ -704,2 +724,3 @@ eventEmitter.emit(events['meeting-state-changed'], data); | ||
meeting.on('livestream-state-changed', _handle_livestream_state_changed); | ||
meeting.on('hls-state-changed', _handle_hls_state_changed); | ||
meeting.localParticipant.on('stream-enabled', _handle_localParticipant_stream_enabled); | ||
@@ -1057,2 +1078,3 @@ meeting.localParticipant.on('stream-disabled', _handle_localParticipant_stream_disabled); | ||
livestreamState: livestreamState, | ||
hlsState: hlsState, | ||
isMeetingJoined: isMeetingJoined, | ||
@@ -1059,0 +1081,0 @@ join: join, |
export const MeetingProviderContex: any; | ||
export function useMeeting({ onParticipantJoined, onParticipantLeft, onSpeakerChanged, onPresenterChanged, onMainParticipantChanged, onEntryRequested, onEntryResponded, onRecordingStarted, onRecordingStopped, onChatMessage, onMeetingJoined, onMeetingLeft, onLiveStreamStarted, onLiveStreamStopped, onVideoStateChanged, onVideoSeeked, onWebcamRequested, onMicRequested, onPinStateChanged, onConnectionOpen, onConnetionClose, onSwitchMeeting, onError, onHlsStarted, onHlsStopped, onRecordingStateChanged, onLivestreamStateChanged, onMeetingStateChanged }?: { | ||
export function useMeeting({ onParticipantJoined, onParticipantLeft, onSpeakerChanged, onPresenterChanged, onMainParticipantChanged, onEntryRequested, onEntryResponded, onRecordingStarted, onRecordingStopped, onChatMessage, onMeetingJoined, onMeetingLeft, onLiveStreamStarted, onLiveStreamStopped, onVideoStateChanged, onVideoSeeked, onWebcamRequested, onMicRequested, onPinStateChanged, onConnectionOpen, onConnetionClose, onSwitchMeeting, onError, onHlsStarted, onHlsStopped, onHlsStateChanged, onRecordingStateChanged, onLivestreamStateChanged, onMeetingStateChanged }?: { | ||
onParticipantJoined?: () => void; | ||
@@ -28,2 +28,3 @@ onParticipantLeft?: () => void; | ||
onHlsStopped?: () => void; | ||
onHlsStateChanged?: () => void; | ||
onRecordingStateChanged?: () => void; | ||
@@ -116,3 +117,3 @@ onLivestreamStateChanged?: () => void; | ||
}; | ||
export function MeetingConsumer({ children, onParticipantJoined, onParticipantLeft, onSpeakerChanged, onPresenterChanged, onMainParticipantChanged, onEntryRequested, onEntryResponded, onRecordingStarted, onRecordingStopped, onChatMessage, onMeetingJoined, onMeetingLeft, onLiveStreamStarted, onLiveStreamStopped, onVideoStateChanged, onVideoSeeked, onWebcamRequested, onMicRequested, onPinStateChanged, onConnectionOpen, onConnetionClose, onSwitchMeeting, onError, onHlsStarted, onHlsStopped, onRecordingStateChanged, onLivestreamStateChanged, onMeetingStateChanged }: { | ||
export function MeetingConsumer({ children, onParticipantJoined, onParticipantLeft, onSpeakerChanged, onPresenterChanged, onMainParticipantChanged, onEntryRequested, onEntryResponded, onRecordingStarted, onRecordingStopped, onChatMessage, onMeetingJoined, onMeetingLeft, onLiveStreamStarted, onLiveStreamStopped, onVideoStateChanged, onVideoSeeked, onWebcamRequested, onMicRequested, onPinStateChanged, onConnectionOpen, onConnetionClose, onSwitchMeeting, onError, onHlsStarted, onHlsStopped, onHlsStateChanged, onRecordingStateChanged, onLivestreamStateChanged, onMeetingStateChanged }: { | ||
children: any; | ||
@@ -144,2 +145,3 @@ onParticipantJoined?: () => void; | ||
onHlsStopped?: () => void; | ||
onHlsStateChanged?: () => void; | ||
onRecordingStateChanged?: () => void; | ||
@@ -146,0 +148,0 @@ onLivestreamStateChanged?: () => void; |
@@ -28,2 +28,3 @@ export const eventEmitter: any; | ||
'hls-stopped': string; | ||
'hls-state-changed': string; | ||
'recording-state-changed': string; | ||
@@ -30,0 +31,0 @@ 'livestream-state-changed': string; |
{ | ||
"name": "@videosdk.live/react-sdk", | ||
"version": "0.1.49", | ||
"version": "0.1.50", | ||
"license": "ISC", | ||
@@ -74,5 +74,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@videosdk.live/js-sdk": "0.0.49", | ||
"@videosdk.live/js-sdk": "0.0.50", | ||
"events": "^3.3.0" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
388988
34
3708
+ Added@videosdk.live/js-sdk@0.0.50(transitive)
- Removed@videosdk.live/js-sdk@0.0.49(transitive)
Updated@videosdk.live/js-sdk@0.0.50