-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved things around to set up mulitple pages
- Loading branch information
Showing
20 changed files
with
465 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React from 'react' | ||
|
||
import VideoView from 'components/Video/VideoView' | ||
import styles from './styles.module.css' | ||
|
||
export class Room extends React.Component { | ||
leaveRoom(room, evt) { | ||
this.props.leaveRoom(room); | ||
} | ||
render() { | ||
const {name, ready, peers, localStream} = this.props; | ||
|
||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.header}> | ||
<div className={styles.title}>{name}</div> | ||
<div onClick={this.leaveRoom.bind(this, name)} | ||
className={styles.controls}> | ||
<i className="fa fa-close"></i> | ||
</div> | ||
</div> | ||
<div className={styles.videoContainer}> | ||
|
||
<div className={styles.main}> | ||
<VideoView ready={ready} | ||
stream={localStream} /> | ||
</div> | ||
|
||
<div className={styles.peers}> | ||
<div className={styles.invited}> | ||
<i className="fa fa-user-plus"></i> | ||
Invite | ||
</div> | ||
<div className={styles.people}> | ||
{peers.map(peer => { | ||
return ( | ||
<div key={peer.id} className={styles.person}> | ||
<VideoView | ||
ready={ready} | ||
stream={peer.stream} /> | ||
</div> | ||
) | ||
})} | ||
</div> | ||
</div> | ||
|
||
<div className={styles.footer}> | ||
<div className={styles.location}> | ||
<i className="fa fa-map-marker"></i> | ||
San Francisco, CA | ||
</div> | ||
<div className={styles.time}> | ||
<i className="fa fa-clock-o"></i> | ||
2:00pm - 2:30pm | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default Room; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
@import url('../../styles/base.css'); | ||
@import url('../../styles/colors.css'); | ||
|
||
:root { | ||
--person-video-height: 75px; | ||
} | ||
|
||
.container { | ||
border-radius: 12px; | ||
overflow: hidden; | ||
margin: 60px; | ||
box-shadow: 0px 2px 2px var(--dark); | ||
border: 0.5px solid var(--dark); | ||
padding: 0; | ||
|
||
width: 450px; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
i { | ||
color: var(--light-gray); | ||
} | ||
|
||
.header { | ||
flex: 1; | ||
margin: 10px; | ||
padding: 0; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
|
||
.controls { | ||
order: 2; | ||
text-align: right; | ||
i { | ||
font-size: 12px; | ||
} | ||
} | ||
.title { | ||
order: 1; | ||
} | ||
} | ||
|
||
.peers { | ||
display: flex; | ||
margin: 10px; | ||
padding: 0px; | ||
align-items: center; | ||
justify-content: space-between; | ||
z-index: -1; | ||
|
||
i { | ||
margin: 0 10px; | ||
} | ||
|
||
.invited { | ||
flex: 1; | ||
} | ||
|
||
.people { | ||
/*flex: 1;*/ | ||
flex-direction: column; | ||
justify-content: flex-end; | ||
align-items: flex-end; | ||
|
||
.person { | ||
display: inline-block; | ||
background-color: var(--dark); | ||
height: var(--person-video-height); | ||
width: var(--person-video-height); | ||
border-radius: calc(var(--person-video-height)/2); | ||
margin-left: var(--padding); | ||
|
||
video { | ||
background-color: var(--dark); | ||
border-radius: calc(var(--person-video-height)/2); | ||
width: var(--person-video-height); | ||
height: var(--person-video-height); | ||
} | ||
} | ||
} | ||
} | ||
|
||
.footer { | ||
min-height: 50px; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 5px; | ||
box-shadow: 0px -2px 1px var(--dark); | ||
|
||
.location, .time { | ||
flex: 1; | ||
padding: 10px; | ||
font-weight: normal; | ||
i { | ||
margin: 0 10px; | ||
font-size: 12px; | ||
} | ||
} | ||
|
||
.location { | ||
} | ||
.time { | ||
text-align: right; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React, { PropTypes as T } from 'react' | ||
import ReactDOM from 'react-dom' | ||
import attachMediaStream from 'attachmediastream' | ||
|
||
import styles from './styles.module.css'; | ||
|
||
export class VideoView extends React.Component { | ||
static propTypes = { | ||
ready: T.bool, | ||
stream: T.object | ||
} | ||
|
||
componentDidMount() { | ||
if (this.props.ready && this.props.stream) { | ||
this.attachVideo(this.props.stream); | ||
} | ||
} | ||
|
||
componentWillReceiveProps(nextProps) { | ||
if (nextProps.ready && nextProps.stream !== this.props.stream) { | ||
this.attachVideo(nextProps.stream); | ||
} | ||
} | ||
|
||
attachVideo(stream) { | ||
let node = ReactDOM.findDOMNode(this.refs.videoView); | ||
attachMediaStream(stream, node); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className={styles.videoContainer}> | ||
<video className={styles.video} | ||
ref='videoView' /> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default VideoView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.videoContainer { | ||
flex: 1; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
video { | ||
width: 100%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@import url('./colors.css'); | ||
|
||
/*buttons*/ | ||
.btn { | ||
display: inline-block; | ||
margin: 10px; | ||
padding: 15px 45px; | ||
font-size: 28px; | ||
line-height: 1.8; | ||
appearance: none; | ||
box-shadow: none; | ||
border: none; | ||
border-radius: 50px; | ||
|
||
color: #fff; | ||
background-color: var(--highlight); | ||
text-shadow: -1px 1px #417cb8; | ||
|
||
&:hover { | ||
background-color: #346392; | ||
text-shadow: -1px 1px #27496d; | ||
} | ||
|
||
&:focus { | ||
outline: none; | ||
} | ||
} |
Oops, something went wrong.