2017-10-06 20:50:01 +08:00
|
|
|
import React from 'react';
|
2018-01-08 12:44:42 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
2016-05-20 21:46:30 +08:00
|
|
|
import ActionsBar from './component';
|
2016-11-08 02:19:00 +08:00
|
|
|
import Service from './service';
|
2018-02-19 12:23:05 +08:00
|
|
|
import VideoService from '../video-provider/service';
|
2018-01-08 12:44:42 +08:00
|
|
|
import { shareScreen, unshareScreen, isVideoBroadcasting } from '../screenshare/service';
|
2018-09-15 00:29:19 +08:00
|
|
|
import { withRouter } from 'react-router';
|
2017-05-02 03:52:57 +08:00
|
|
|
|
2017-11-24 01:20:27 +08:00
|
|
|
const ActionsBarContainer = props => <ActionsBar {...props} />;
|
2016-04-29 03:02:51 +08:00
|
|
|
|
2018-09-15 00:29:19 +08:00
|
|
|
export default withRouter(withTracker(({ location, router }) => {
|
|
|
|
const togglePollMenu = () => {
|
|
|
|
if (location.pathname.indexOf('/poll') !== -1) {
|
|
|
|
router.push('/');
|
|
|
|
} else {
|
|
|
|
router.push('/users/poll');
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
|
|
isUserPresenter: Service.isUserPresenter(),
|
|
|
|
isUserModerator: Service.isUserModerator(),
|
|
|
|
handleExitVideo: () => VideoService.exitVideo(),
|
|
|
|
handleJoinVideo: () => VideoService.joinVideo(),
|
|
|
|
handleShareScreen: onFail => shareScreen(onFail),
|
|
|
|
handleUnshareScreen: () => unshareScreen(),
|
|
|
|
isVideoBroadcasting: isVideoBroadcasting(),
|
|
|
|
recordSettingsList: Service.recordSettingsList(),
|
|
|
|
toggleRecording: Service.toggleRecording,
|
|
|
|
togglePollMenu,
|
|
|
|
};
|
|
|
|
})(ActionsBarContainer));
|