Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
}
},
"globals": {
"YT": "readonly"
"YT": "readonly",
"ICE_SERVERS": "readonly"
},
"rules": {
"indent": [
Expand All @@ -53,12 +54,15 @@
"error",
"always"
],
"no-unused-vars": [
"warn"
],
"no-console": [
"error",
"warn",
{ "allow": ["info", "warn", "error"] }
],
"no-inline-comments": [
"error"
"warn"
],
"spaced-comment": [
"error",
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ lint:
npx eslint src/* --ext .js,.json --fix

start-client:
php -S 0.0.0.0:8000 -t build
php -S 0.0.0.0:8020 -t build

start-server:
node bin/server.js 8001
node bin/server.js 8021

# Publish package
publish: build
Expand Down
4 changes: 4 additions & 0 deletions assets/css/components/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,8 @@
&[disabled] .icon-loader {
color: $color-primary;
}

&.active, &.active:hover {
color: $color-primary;
}
}
16 changes: 14 additions & 2 deletions assets/css/components/user-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@
border-radius: 100%;

sup {
font-size: 0.6em;
font-size: 0.5em;
position: absolute;
top: 0;
top: -0.2em;
right: 0;
text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.66);
}

sub {
font-size: 0.4em;
position: absolute;
bottom: -0.2em;
right: 0;
text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.66);
}
Expand All @@ -34,6 +42,10 @@
color: green;
}

&.streaming sub {
color: $color-primary;
}

&.loading sup {
color: red;
}
Expand Down
1 change: 1 addition & 0 deletions assets/css/core/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ $icons: (
"volume-low": "\e911",
"volume-medium": "\e912",
"volume-none": "\e910",
"stream": "\e90f",
);

@font-face {
Expand Down
1 change: 1 addition & 0 deletions assets/fonts/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fonts/icons.ttf
Binary file not shown.
Binary file modified assets/fonts/icons.woff
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/fonts/selection.json

Large diffs are not rendered by default.

55 changes: 54 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"redux": "^4.1.0",
"redux-logger": "^3.0.6",
"reset-css": "^5.0.1",
"tom32i-event-emitter.js": "^2.0.5"
"tom32i-event-emitter.js": "^2.0.5",
"webrtc-adapter": "^7.7.0"
},
"devDependencies": {
"@babel/core": "^7.14.0",
Expand Down
13 changes: 11 additions & 2 deletions src/client/components/Controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Button from '@client/components/Button';
import VolumeControl from '@client/components/VolumeControl';
import StreamButton from '@client/components/StreamButton';

class Controls extends Component {
static propTypes = {
Expand All @@ -13,6 +14,12 @@ class Controls extends Component {
onStop: PropTypes.func.isRequired,
onBackward: PropTypes.func.isRequired,
onForward: PropTypes.func.isRequired,
toggleStream: PropTypes.func,
streamable: PropTypes.bool.isRequired,
};

static defaultProps = {
toggleStream: null,
};

constructor(props) {
Expand Down Expand Up @@ -102,14 +109,15 @@ class Controls extends Component {
}

render() {
const { playing, loaded, onStop, onBackward, onForward } = this.props;
const { playing, loaded, streamable, onStop, onBackward, onForward, toggleStream } = this.props;
const playIcon = loaded ? playing ? 'icon-pause' : 'icon-play' : 'icon-loader';
const screenIcon = this.fullscreen ? 'icon-minimise' : 'icon-maximise';

return (
<div className="player-controls">
<div className="group">
<Button disabled={!loaded} label={<span className="icon-stop" />} onClick={onStop} />
{streamable ? <StreamButton disabled={!loaded} onClick={toggleStream} /> : null}
</div>
<div className="group">
<Button disabled={!loaded} label={<span className="icon-backward" onClick={onBackward} />} />
Expand All @@ -129,5 +137,6 @@ export default connect(
state => ({
playing: state.player.playing,
loaded: state.player.loaded,
})
streamable: state.player.source === 'file',
}),
)(Controls);
Loading