Fix autosharewebcam option not working on first join
This commit is contained in:
parent
ad57657b18
commit
fb6aeb90f9
@ -23,6 +23,11 @@ const intlMessages = defineMessages({
|
||||
});
|
||||
|
||||
class MediaContainer extends Component {
|
||||
componentWillMount() {
|
||||
const { willMount } = this.props;
|
||||
willMount && willMount();
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const {
|
||||
isScreensharing,
|
||||
@ -74,10 +79,14 @@ export default withTracker(() => {
|
||||
|
||||
if (data.swapLayout) {
|
||||
data.floatingOverlay = true;
|
||||
data.hideOverlay = hidePresentation;
|
||||
}
|
||||
|
||||
if (hidePresentation) {
|
||||
data.hideOverlay = true;
|
||||
}
|
||||
const enableVideo = Meteor.settings.public.kurento.enableVideo;
|
||||
const autoShareWebcam = SessionStorage.getItem('meta_html5autosharewebcam') || false;
|
||||
|
||||
if (enableVideo && autoShareWebcam) {
|
||||
data.willMount = VideoService.joinVideo;
|
||||
}
|
||||
|
||||
return data;
|
||||
|
@ -9,11 +9,8 @@ import SessionStorage from '/imports/ui/services/storage/session';
|
||||
|
||||
class VideoService {
|
||||
constructor() {
|
||||
const enableVideo = Meteor.settings.public.kurento.enableVideo;
|
||||
const autoShareWebcam = SessionStorage.getItem('meta_html5autosharewebcam') || false;
|
||||
|
||||
this.defineProperties({
|
||||
isSharing: autoShareWebcam && enableVideo,
|
||||
isSharing: false,
|
||||
isConnected: false,
|
||||
isWaitingResponse: false,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user