diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..247f1f0
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,11 @@
+; top-most EditorConfig file
+root = true
+
+; Unix-style newlines
+[*]
+charset = utf-8
+end_of_line = lf
+indent_size = 2
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
diff --git a/.gitignore b/.gitignore
index 273e5ef..5ce6a77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.DS_Store
+yarn.lock
*.swp
*.swo
dist/
diff --git a/src/client/components/App.js b/src/client/components/App.js
index 50db8bf..d031dd9 100644
--- a/src/client/components/App.js
+++ b/src/client/components/App.js
@@ -1,5 +1,6 @@
import Alerts, { AlertPropType } from './Alerts.js'
import * as constants from '../constants.js'
+import Toolbar from './Toolbar.js'
import Input from './Input.js'
import Notifications, { NotificationPropTypes } from './Notifications.js'
import PropTypes from 'prop-types'
@@ -38,6 +39,7 @@ export default class App extends React.PureComponent {
} = this.props
return (
+
diff --git a/src/client/components/Toolbar.js b/src/client/components/Toolbar.js
new file mode 100644
index 0000000..be049d3
--- /dev/null
+++ b/src/client/components/Toolbar.js
@@ -0,0 +1,100 @@
+import PropTypes from 'prop-types'
+import React from 'react'
+import { StreamPropType } from './video.js'
+
+export default class Toolbar extends React.PureComponent {
+ static propTypes = {
+ stream: StreamPropType
+ }
+ handleMicClick = e => {
+ const { stream } = this.props
+ stream.mediaStream.getAudioTracks().forEach(track => {
+ track.enabled = !track.enabled
+ });
+ e.currentTarget.classList.toggle('on')
+ }
+ handleCamClick = e => {
+ const { stream } = this.props
+ stream.mediaStream.getVideoTracks().forEach(track => {
+ track.enabled = !track.enabled
+ });
+ e.currentTarget.classList.toggle('on')
+ }
+ handleFullscreenClick = e => {
+ const document = window.document;
+ const fs = document.getElementById('container');
+ if (
+ !document.fullscreenElement &&
+ !document.mozFullScreenElement &&
+ !document.webkitFullscreenElement &&
+ !document.msFullscreenElement
+ ) {
+ if (fs.requestFullscreen) {
+ fs.requestFullscreen();
+ } else if (fs.msRequestFullscreen) {
+ fs.msRequestFullscreen();
+ } else if (fs.mozRequestFullScreen) {
+ fs.mozRequestFullScreen();
+ } else if (fs.webkitRequestFullscreen) {
+ fs.webkitRequestFullscreen();
+ }
+ } else {
+ if (document.exitFullscreen) {
+ document.exitFullscreen();
+ } else if (document.msExitFullscreen) {
+ document.msExitFullscreen();
+ } else if (document.mozCancelFullScreen) {
+ document.mozCancelFullScreen();
+ } else if (document.webkitExitFullscreen) {
+ document.webkitExitFullscreen();
+ }
+ }
+ e.target.classList.toggle('on')
+ }
+ handleHangoutClick = e => {
+ location.href = '/'
+ }
+ render () {
+ const { stream } = this.props
+
+ return (
+
+
+ {stream && (
+
+ )}
+
+ {stream && (
+
+ )}
+
+
+
+
+
+ )
+ }
+}
diff --git a/src/client/components/Video.js b/src/client/components/Video.js
index 3682d30..f3f3c14 100644
--- a/src/client/components/Video.js
+++ b/src/client/components/Video.js
@@ -50,7 +50,7 @@ export default class Video extends React.PureComponent {