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 (