Merge branch 'update', closes #53
This commit is contained in:
commit
1db22e9b5c
@ -6,7 +6,8 @@
|
|||||||
"jsx-quotes": ["error", "prefer-double"],
|
"jsx-quotes": ["error", "prefer-double"],
|
||||||
"padded-blocks": 0,
|
"padded-blocks": 0,
|
||||||
"import/first": 0,
|
"import/first": 0,
|
||||||
"no-return-assign": 0
|
"no-return-assign": 0,
|
||||||
|
"indent": ["error", 2, { "MemberExpression": 0, "SwitchCase": 1, "flatTernaryExpressions": true }],
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"expect": true,
|
"expect": true,
|
||||||
|
|||||||
3065
package-lock.json
generated
3065
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
78
package.json
78
package.json
@ -27,13 +27,23 @@
|
|||||||
},
|
},
|
||||||
"babel": {
|
"babel": {
|
||||||
"presets": [
|
"presets": [
|
||||||
"es2015",
|
[
|
||||||
"es2016",
|
"@babel/preset-env",
|
||||||
"react"
|
{
|
||||||
|
"targets": {
|
||||||
|
"browsers": [
|
||||||
|
"last 2 versions",
|
||||||
|
"safari >= 7",
|
||||||
|
"ie >= 11"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@babel/preset-react"
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"transform-object-rest-spread",
|
"@babel/plugin-proposal-class-properties",
|
||||||
"transform-class-properties"
|
"@babel/plugin-proposal-object-rest-spread"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"author": "Jerko Steiner",
|
"author": "Jerko Steiner",
|
||||||
@ -41,51 +51,51 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bluebird": "^3.3.4",
|
"bluebird": "^3.3.4",
|
||||||
"classnames": "^2.2.5",
|
"classnames": "^2.2.5",
|
||||||
"config": "^1.26.1",
|
"config": "^3.0.0",
|
||||||
"express": "^4.13.3",
|
"express": "^4.13.3",
|
||||||
"prop-types": "^15.5.10",
|
"prop-types": "^15.5.10",
|
||||||
"pug": "^2.0.0-rc.2",
|
"pug": "^2.0.0-rc.2",
|
||||||
"react": "^15.5.4",
|
"react": "^16.6.3",
|
||||||
"react-dom": "^15.5.4",
|
"react-dom": "^16.6.3",
|
||||||
"react-redux": "^5.0.5",
|
"react-redux": "^6.0.0",
|
||||||
"react-transition-group": "^1.1.3",
|
"react-transition-group": "^1.2.1",
|
||||||
"redux": "^3.6.0",
|
"redux": "^4.0.1",
|
||||||
"redux-logger": "^3.0.6",
|
"redux-logger": "^3.0.6",
|
||||||
"redux-promise-middleware": "^4.2.0",
|
"redux-promise-middleware": "^5.1.1",
|
||||||
"redux-thunk": "^2.2.0",
|
"redux-thunk": "^2.2.0",
|
||||||
"screenfull": "^3.3.3",
|
"screenfull": "^3.3.3",
|
||||||
"seamless-immutable": "^7.1.2",
|
"seamless-immutable": "^7.1.2",
|
||||||
"simple-peer": "^8.1.0",
|
"simple-peer": "^9.1.2",
|
||||||
"socket.io": "^2.1.1",
|
"socket.io": "^2.2.0",
|
||||||
"socket.io-client": "^2.1.1",
|
"socket.io-client": "^2.2.0",
|
||||||
"underscore": "^1.8.3",
|
"underscore": "^1.8.3",
|
||||||
"uuid": "^2.0.1"
|
"uuid": "^3.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-eslint": "^7.2.3",
|
"@babel/core": "^7.2.0",
|
||||||
"babel-jest": "^20.0.3",
|
"@babel/plugin-proposal-class-properties": "^7.2.1",
|
||||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
"@babel/plugin-proposal-object-rest-spread": "^7.2.0",
|
||||||
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
"@babel/preset-env": "^7.2.0",
|
||||||
"babel-preset-es2015": "^6.24.1",
|
"@babel/preset-react": "^7.0.0",
|
||||||
"babel-preset-es2016": "^6.24.1",
|
"babel-core": "^7.0.0-bridge.0",
|
||||||
"babel-preset-react": "^6.24.1",
|
"babel-eslint": "^10.0.1",
|
||||||
"babelify": "^7.3.0",
|
"babel-jest": "^23.6.0",
|
||||||
|
"babelify": "^10.0.0",
|
||||||
"chastifol": "^4.1.0",
|
"chastifol": "^4.1.0",
|
||||||
"eslint": "^3.19.0",
|
"eslint": "^5.10.0",
|
||||||
"eslint-config-standard": "^10.2.1",
|
"eslint-config-standard": "^12.0.0",
|
||||||
"eslint-config-standard-react": "^5.0.0",
|
"eslint-config-standard-react": "^7.0.2",
|
||||||
"eslint-plugin-import": "^2.3.0",
|
"eslint-plugin-import": "^2.3.0",
|
||||||
"eslint-plugin-node": "^5.0.0",
|
"eslint-plugin-node": "^8.0.0",
|
||||||
"eslint-plugin-promise": "^3.5.0",
|
"eslint-plugin-promise": "^4.0.1",
|
||||||
"eslint-plugin-react": "^7.0.1",
|
"eslint-plugin-react": "^7.0.1",
|
||||||
"eslint-plugin-standard": "^3.0.1",
|
"eslint-plugin-standard": "^4.0.0",
|
||||||
"jest-cli": "^23.6.0",
|
"jest-cli": "^23.6.0",
|
||||||
"node-sass": "^4.5.3",
|
"node-sass": "^4.11.0",
|
||||||
"nodemon": "^1.18.7",
|
"nodemon": "^1.18.8",
|
||||||
"react-addons-test-utils": "^15.5.1",
|
|
||||||
"redux-mock-store": "^1.2.3",
|
"redux-mock-store": "^1.2.3",
|
||||||
"supertest": "^3.0.0",
|
"supertest": "^3.0.0",
|
||||||
"uglify-js": "^2.6.2",
|
"uglify-js": "^3.4.9",
|
||||||
"watchify": "^3.9.0"
|
"watchify": "^3.9.0"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
|
|||||||
@ -18,8 +18,8 @@ export class MediaStream {
|
|||||||
}
|
}
|
||||||
export function getUserMedia () {
|
export function getUserMedia () {
|
||||||
return !getUserMedia.shouldFail
|
return !getUserMedia.shouldFail
|
||||||
? Promise.resolve(getUserMedia.stream)
|
? Promise.resolve(getUserMedia.stream)
|
||||||
: Promise.reject(new Error('test'))
|
: Promise.reject(new Error('test'))
|
||||||
}
|
}
|
||||||
getUserMedia.fail = shouldFail => getUserMedia.shouldFail = shouldFail
|
getUserMedia.fail = shouldFail => getUserMedia.shouldFail = shouldFail
|
||||||
getUserMedia.stream = new MediaStream()
|
getUserMedia.stream = new MediaStream()
|
||||||
|
|||||||
@ -74,6 +74,7 @@ export default class App extends React.PureComponent {
|
|||||||
onClick={toggleActive}
|
onClick={toggleActive}
|
||||||
stream={streams[constants.ME]}
|
stream={streams[constants.ME]}
|
||||||
userId={constants.ME}
|
userId={constants.ME}
|
||||||
|
muted
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{_.map(peers, (_, userId) => (
|
{_.map(peers, (_, userId) => (
|
||||||
@ -83,6 +84,7 @@ export default class App extends React.PureComponent {
|
|||||||
onClick={toggleActive}
|
onClick={toggleActive}
|
||||||
stream={streams[userId]}
|
stream={streams[userId]}
|
||||||
userId={userId}
|
userId={userId}
|
||||||
|
videos={videos}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
|
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import { CSSTransitionGroup } from 'react-transition-group'
|
|
||||||
|
|
||||||
export const NotificationPropTypes = PropTypes.shape({
|
export const NotificationPropTypes = PropTypes.shape({
|
||||||
id: PropTypes.string.isRequired,
|
id: PropTypes.string.isRequired,
|
||||||
|
|||||||
@ -15,7 +15,11 @@ export default class Video extends React.PureComponent {
|
|||||||
onClick: PropTypes.func,
|
onClick: PropTypes.func,
|
||||||
active: PropTypes.bool.isRequired,
|
active: PropTypes.bool.isRequired,
|
||||||
stream: StreamPropType,
|
stream: StreamPropType,
|
||||||
userId: PropTypes.string.isRequired
|
userId: PropTypes.string.isRequired,
|
||||||
|
muted: PropTypes.bool.isRequired
|
||||||
|
}
|
||||||
|
static defaultProps = {
|
||||||
|
muted: false
|
||||||
}
|
}
|
||||||
handleClick = e => {
|
handleClick = e => {
|
||||||
const { onClick, userId } = this.props
|
const { onClick, userId } = this.props
|
||||||
@ -41,12 +45,10 @@ export default class Video extends React.PureComponent {
|
|||||||
} else if (video.src !== url) {
|
} else if (video.src !== url) {
|
||||||
video.src = url
|
video.src = url
|
||||||
}
|
}
|
||||||
if (socket.id) {
|
videos[socket.id] = video
|
||||||
videos[socket.id] = video
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
render () {
|
render () {
|
||||||
const { active } = this.props
|
const { active, muted } = this.props
|
||||||
const className = classnames('video-container', { active })
|
const className = classnames('video-container', { active })
|
||||||
return (
|
return (
|
||||||
<div className={className}>
|
<div className={className}>
|
||||||
@ -57,6 +59,7 @@ export default class Video extends React.PureComponent {
|
|||||||
onLoadedMetadata={this.play}
|
onLoadedMetadata={this.play}
|
||||||
playsInline
|
playsInline
|
||||||
ref="video"
|
ref="video"
|
||||||
|
muted={muted}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user