@videosdk.live/react-sdk
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -28,3 +28,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var eventEmitter = new EventEmitter(); | ||
eventEmitter.setMaxListeners(100); | ||
eventEmitter.setMaxListeners(9999); | ||
@@ -228,2 +228,13 @@ var MeetingProviderContex = React.createContext(); | ||
var _useState12 = React.useState({ | ||
currentTime: 0, | ||
link: '' | ||
}), | ||
externalVideo = _useState12[0], | ||
setExternalVideo = _useState12[1]; | ||
var _useState13 = React.useState(false), | ||
isLiveStreaming = _useState13[0], | ||
setIsLiveStreaming = _useState13[1]; | ||
var meetingRef = React.useRef(); | ||
@@ -262,2 +273,7 @@ var localMicOnRef = React.useRef(); | ||
setMessages([]); | ||
setExternalVideo({ | ||
currentTime: 0, | ||
link: '' | ||
}); | ||
setIsLiveStreaming(false); | ||
}; | ||
@@ -355,7 +371,9 @@ | ||
var _handle_live_stream_started = function _handle_live_stream_started(data) { | ||
setIsLiveStreaming(true); | ||
eventEmitter.emit(events['live-stream-started'], data); | ||
}; | ||
var _handle_live_stream_stopped = function _handle_live_stream_stopped(data) { | ||
eventEmitter.emit(events['live-stream-stopped'], data); | ||
var _handle_live_stream_stopped = function _handle_live_stream_stopped() { | ||
setIsLiveStreaming(false); | ||
eventEmitter.emit(events['live-stream-stopped']); | ||
}; | ||
@@ -368,2 +386,6 @@ | ||
var _handle_video_stopped = function _handle_video_stopped(data) { | ||
setExternalVideo({ | ||
currentTime: 0, | ||
link: '' | ||
}); | ||
eventEmitter.emit(events['video-stopped'], data); | ||
@@ -594,7 +616,10 @@ }; | ||
var startVideo = function startVideo(link) { | ||
var startVideo = function startVideo(_ref2) { | ||
var link = _ref2.link; | ||
var meeting = meetingRef.current; | ||
if (meeting) { | ||
meeting.startVideo(link); | ||
meeting.startVideo({ | ||
link: link | ||
}); | ||
} | ||
@@ -652,2 +677,4 @@ }; | ||
isRecording: isRecording, | ||
externalVideo: externalVideo, | ||
isLiveStreaming: isLiveStreaming, | ||
join: join, | ||
@@ -654,0 +681,0 @@ leave: leave, |
@@ -25,3 +25,3 @@ import React, { createContext, useEffect, useContext, useState, useRef } from 'react'; | ||
var eventEmitter = new EventEmitter(); | ||
eventEmitter.setMaxListeners(100); | ||
eventEmitter.setMaxListeners(9999); | ||
@@ -225,2 +225,13 @@ var MeetingProviderContex = createContext(); | ||
var _useState12 = useState({ | ||
currentTime: 0, | ||
link: '' | ||
}), | ||
externalVideo = _useState12[0], | ||
setExternalVideo = _useState12[1]; | ||
var _useState13 = useState(false), | ||
isLiveStreaming = _useState13[0], | ||
setIsLiveStreaming = _useState13[1]; | ||
var meetingRef = useRef(); | ||
@@ -259,2 +270,7 @@ var localMicOnRef = useRef(); | ||
setMessages([]); | ||
setExternalVideo({ | ||
currentTime: 0, | ||
link: '' | ||
}); | ||
setIsLiveStreaming(false); | ||
}; | ||
@@ -352,7 +368,9 @@ | ||
var _handle_live_stream_started = function _handle_live_stream_started(data) { | ||
setIsLiveStreaming(true); | ||
eventEmitter.emit(events['live-stream-started'], data); | ||
}; | ||
var _handle_live_stream_stopped = function _handle_live_stream_stopped(data) { | ||
eventEmitter.emit(events['live-stream-stopped'], data); | ||
var _handle_live_stream_stopped = function _handle_live_stream_stopped() { | ||
setIsLiveStreaming(false); | ||
eventEmitter.emit(events['live-stream-stopped']); | ||
}; | ||
@@ -365,2 +383,6 @@ | ||
var _handle_video_stopped = function _handle_video_stopped(data) { | ||
setExternalVideo({ | ||
currentTime: 0, | ||
link: '' | ||
}); | ||
eventEmitter.emit(events['video-stopped'], data); | ||
@@ -591,7 +613,10 @@ }; | ||
var startVideo = function startVideo(link) { | ||
var startVideo = function startVideo(_ref2) { | ||
var link = _ref2.link; | ||
var meeting = meetingRef.current; | ||
if (meeting) { | ||
meeting.startVideo(link); | ||
meeting.startVideo({ | ||
link: link | ||
}); | ||
} | ||
@@ -649,2 +674,4 @@ }; | ||
isRecording: isRecording, | ||
externalVideo: externalVideo, | ||
isLiveStreaming: isLiveStreaming, | ||
join: join, | ||
@@ -651,0 +678,0 @@ leave: leave, |
{ | ||
"name": "@videosdk.live/react-sdk", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168405
1439