Skip to content

Instantly share code, notes, and snippets.

@LukeSmetham
Last active September 24, 2019 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LukeSmetham/49b3f5220fa2c82003e04bcb8dd9276b to your computer and use it in GitHub Desktop.
Save LukeSmetham/49b3f5220fa2c82003e04bcb8dd9276b to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import styled from 'styled-components';
import { ConferenceRoom } from '@voxeet/react-components';
// Components //
import ActionButtons from './components/ActionButtons';
// Containers //
import AttendeesChat from './containers/AttendeesChat';
class Conference extends Component {
handleOnConnect = () => {
console.log('Participant connected');
};
handleOnLeave = () => {
console.log('Participant disconnected');
this.props.history.push('/');
};
get settings() {
return {
consumerKey: process.env.REACT_APP_VOX_KEY,
consumerSecret: process.env.REACT_APP_VOX_SECRET,
constraints: {
audio: true,
video: true,
},
videoRatio: {
width: 1920,
height: 1080,
},
videoCodec: 'H264',
};
}
render() {
const { match } = this.props;
return (
<ConferenceRoom
isWidget={false}
autoJoin
kickOnHangUp
handleOnLeave={this.handleOnLeave}
handleOnConnect={this.handleOnConnect}
{...this.settings}
conferenceAlias={match.params.conferenceAlias}
/>
);
}
}
export default Conference;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment