diff --git a/app/lib/components/Filmstrip/index.jsx b/app/lib/components/Filmstrip/index.jsx
new file mode 100644
index 00000000..9266368a
--- /dev/null
+++ b/app/lib/components/Filmstrip/index.jsx
@@ -0,0 +1,75 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import { connect } from 'react-redux';
+import * as appPropTypes from '../appPropTypes';
+import Peer from '../Peer';
+
+class Filmstrip extends Component
+{
+ state = {
+ selectedPeerName : null
+ };
+
+ handleSelectPeer = (selectedPeerName) =>
+ {
+ this.setState({
+ selectedPeerName
+ });
+ };
+
+ render()
+ {
+ const { activeSpeakerName, peers, advancedMode } = this.props;
+
+ // Find the name of the peer which is currently speaking. This is either
+ // the latest active speaker, or the manually selected peer.
+ const activePeerName = this.state.selectedPeerName || activeSpeakerName;
+
+ // Find the remainding peer names, which will be shown in the filmstrip.
+ const remaindingPeerNames = Object.keys(peers).filter((peerName) =>
+ peerName !== activePeerName);
+
+ return (
+
+ {peers[activePeerName] && (
+
+ )}
+
+
+ {remaindingPeerNames.map((peerName) => (
+
this.handleSelectPeer(peerName)}
+ >
+
+
+ ))}
+
+
+ );
+ }
+}
+
+Filmstrip.propTypes = {
+ activeSpeakerName : PropTypes.string,
+ advancedMode : PropTypes.bool,
+ peers : appPropTypes.peers
+};
+
+const mapStateToProps = (state) =>
+ ({
+ activeSpeakerName : state.room.activeSpeakerName,
+ peers : state.peers
+ });
+
+export default connect(
+ mapStateToProps
+)(Filmstrip);
diff --git a/app/lib/components/Peers.jsx b/app/lib/components/Peers.jsx
index fccebb8d..b219db5f 100644
--- a/app/lib/components/Peers.jsx
+++ b/app/lib/components/Peers.jsx
@@ -82,8 +82,7 @@ class Peers extends React.Component
const {
advancedMode,
activeSpeakerName,
- peers,
- toolAreaOpen
+ peers
} = this.props;
const style =
@@ -108,7 +107,6 @@ class Peers extends React.Component
advancedMode={advancedMode}
name={peer.name}
style={style}
- toolAreaOpen={toolAreaOpen}
/>
@@ -125,8 +123,7 @@ Peers.propTypes =
advancedMode : PropTypes.bool,
peers : PropTypes.arrayOf(appPropTypes.Peer).isRequired,
boxes : PropTypes.number,
- activeSpeakerName : PropTypes.string,
- toolAreaOpen : PropTypes.bool
+ activeSpeakerName : PropTypes.string
};
const mapStateToProps = (state) =>
@@ -139,8 +136,7 @@ const mapStateToProps = (state) =>
return {
peers,
boxes,
- activeSpeakerName : state.room.activeSpeakerName,
- toolAreaOpen : state.toolarea.toolAreaOpen
+ activeSpeakerName : state.room.activeSpeakerName
};
};
diff --git a/app/lib/components/Room.jsx b/app/lib/components/Room.jsx
index 7202c90d..0e813749 100644
--- a/app/lib/components/Room.jsx
+++ b/app/lib/components/Room.jsx
@@ -17,6 +17,7 @@ import FullScreenView from './FullScreenView';
import Draggable from 'react-draggable';
import { idle } from '../utils';
import Sidebar from './Sidebar';
+import Filmstrip from './Filmstrip';
// Hide toolbars after 10 seconds of inactivity.
const TIMEOUT = 10 * 1000;
@@ -121,9 +122,12 @@ class Room extends React.Component
-
+
+ {false && (
+
+ )}