bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/video-provider/container.jsx
2018-09-13 15:09:30 -03:00

18 lines
752 B
JavaScript
Executable File

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import getFromUserSettings from '/imports/ui/services/users-settings';
import VideoProvider from './component';
import VideoService from './service';
const VideoProviderContainer = ({ children, ...props }) =>
(!props.users.length ? null : <VideoProvider {...props}>{children}</VideoProvider>);
export default withTracker(() => ({
meetingId: VideoService.meetingId(),
users: VideoService.getAllUsersVideo(),
userId: VideoService.userId(),
sessionToken: VideoService.sessionToken(),
userName: VideoService.userName(),
enableVideoStats: getFromUserSettings('enableVideoStats', Meteor.settings.public.kurento.enableVideoStats),
}))(VideoProviderContainer);