diff --git a/src/routes/Player/ControlBar/ControlBar.js b/src/routes/Player/ControlBar/ControlBar.js
index 3405bb85b..9d967a141 100644
--- a/src/routes/Player/ControlBar/ControlBar.js
+++ b/src/routes/Player/ControlBar/ControlBar.js
@@ -9,14 +9,6 @@ import VolumeBar from './VolumeBar';
import SubtitlesPicker from './SubtitlesPicker';
import styles from './styles';
-const ControlBarButton = React.forwardRef(({ icon, active, disabled, onClick }, ref) => (
-
-
-
-));
-
-ControlBarButton.displayName = 'ControlBarButton';
-
class ControlBar extends Component {
constructor(props) {
super(props);
@@ -63,89 +55,56 @@ class ControlBar extends Component {
this.setState({ subtitlesPopupOpen: false });
}
- renderSeekBar() {
- return (
-
- );
- }
-
- renderPlayPauseButton() {
- return (
-
- );
- }
-
- renderVolumeBar() {
- return (
-
- );
- }
-
- renderShareButton() {
- return (
-
-
-
-
-
-
-
-
- );
- }
-
- renderSubtitlesButton() {
- return (
-
-
-
-
-
-
-
-
- );
- }
-
render() {
return (
- {this.renderSeekBar()}
+
- {this.renderPlayPauseButton()}
- {this.renderVolumeBar()}
+
+
- {this.renderSubtitlesButton()}
- {this.renderShareButton()}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
diff --git a/src/routes/Player/ControlBar/PlayPauseButton/PlayPauseButton.js b/src/routes/Player/ControlBar/PlayPauseButton/PlayPauseButton.js
index 8d75851b3..3dd3f0ccb 100644
--- a/src/routes/Player/ControlBar/PlayPauseButton/PlayPauseButton.js
+++ b/src/routes/Player/ControlBar/PlayPauseButton/PlayPauseButton.js
@@ -1,10 +1,11 @@
-import React, { Component } from 'react';
-import PropTypes from 'prop-types';
+const React = require('react');
+const PropTypes = require('prop-types');
+const Icon = require('stremio-icons/dom');
-class PlayPauseButton extends Component {
+class PlayPauseButton extends React.Component {
shouldComponentUpdate(nextProps, nextState) {
return nextProps.paused !== this.props.paused ||
- nextProps.toggleButtonComponent !== this.props.toggleButtonComponent;
+ nextProps.className !== this.props.className;
}
togglePaused = () => {
@@ -17,18 +18,18 @@ class PlayPauseButton extends Component {
}
const icon = this.props.paused ? 'ic_play' : 'ic_pause';
- return React.createElement(this.props.toggleButtonComponent, { icon, onClick: this.togglePaused }, null);
+ return (
+
+
+
+ );
}
}
PlayPauseButton.propTypes = {
+ className: PropTypes.string,
paused: PropTypes.bool,
- dispatch: PropTypes.func.isRequired,
- toggleButtonComponent: PropTypes.oneOfType([
- PropTypes.func,
- PropTypes.string,
- PropTypes.shape({ render: PropTypes.func.isRequired }),
- ]).isRequired
+ dispatch: PropTypes.func.isRequired
};
-export default PlayPauseButton;
+module.exports = PlayPauseButton;
diff --git a/src/routes/Player/ControlBar/PlayPauseButton/index.js b/src/routes/Player/ControlBar/PlayPauseButton/index.js
index 712cb531e..cdaf43c88 100644
--- a/src/routes/Player/ControlBar/PlayPauseButton/index.js
+++ b/src/routes/Player/ControlBar/PlayPauseButton/index.js
@@ -1,3 +1,3 @@
-import PlayPauseButton from './PlayPauseButton';
+const PlayPauseButton = require('./PlayPauseButton');
-export default PlayPauseButton;
+module.exports = PlayPauseButton;
diff --git a/src/routes/Player/ControlBar/VolumeBar/VolumeBar.js b/src/routes/Player/ControlBar/VolumeBar/VolumeBar.js
index 98f8f8996..961590353 100644
--- a/src/routes/Player/ControlBar/VolumeBar/VolumeBar.js
+++ b/src/routes/Player/ControlBar/VolumeBar/VolumeBar.js
@@ -1,11 +1,12 @@
-import React, { Component } from 'react';
-import PropTypes from 'prop-types';
-import classnames from 'classnames';
-import debounce from 'lodash.debounce';
-import { Slider } from 'stremio-common';
-import styles from './styles';
+const React = require('react');
+const PropTypes = require('prop-types');
+const classnames = require('classnames');
+const debounce = require('lodash.debounce');
+const Icon = require('stremio-icons/dom');
+const { Slider } = require('stremio-common');
+const styles = require('./styles');
-class VolumeBar extends Component {
+class VolumeBar extends React.Component {
constructor(props) {
super(props);
@@ -17,8 +18,8 @@ class VolumeBar extends Component {
shouldComponentUpdate(nextProps, nextState) {
return nextState.volume !== this.state.volume ||
nextProps.className !== this.props.className ||
- nextProps.volume !== this.props.volume ||
- nextProps.toggleButtonComponent !== this.props.toggleButtonComponent;
+ nextProps.buttonClassName !== this.props.buttonClassName ||
+ nextProps.volume !== this.props.volume;
}
componentWillUnmount() {
@@ -62,7 +63,9 @@ class VolumeBar extends Component {
'ic_volume3';
return (
- {React.createElement(this.props.toggleButtonComponent, { icon, onClick: this.toogleVolumeMute }, null)}
+
+
+