bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/video-provider/container.jsx

24 lines
921 B
React
Raw Normal View History

2018-02-17 03:18:53 +08:00
import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import getFromUserSettings from '/imports/ui/services/users-settings';
2018-02-17 03:18:53 +08:00
import VideoProvider from './component';
import VideoService from './service';
2018-02-17 03:18:53 +08:00
2018-12-18 06:19:26 +08:00
const VideoProviderContainer = ({ children, ...props }) => {
const { users } = props;
return (!users.length ? null : <VideoProvider {...props}>{children}</VideoProvider>);
};
2018-02-17 03:18:53 +08:00
2019-03-05 01:29:40 +08:00
export default withTracker(props => ({
cursor: props.cursor,
swapLayout: props.swapLayout,
2019-07-10 07:11:48 +08:00
mediaHeight: props.mediaHeight,
meetingId: VideoService.meetingId(),
users: VideoService.getAllUsersVideo(),
userId: VideoService.userId(),
sessionToken: VideoService.sessionToken(),
userName: VideoService.userName(),
enableVideoStats: getFromUserSettings('enableVideoStats', Meteor.settings.public.kurento.enableVideoStats),
voiceBridge: VideoService.voiceBridge(),
}))(VideoProviderContainer);