diff --git a/app/lib/RoomClient.js b/app/lib/RoomClient.js index 9bf973c..fa283d7 100644 --- a/app/lib/RoomClient.js +++ b/app/lib/RoomClient.js @@ -16,7 +16,7 @@ import { const logger = new Logger('RoomClient'); -const ROOM_OPTIONS = +let ROOM_OPTIONS = { requestTimeout : requestTimeout, transportOptions : transportOptions, @@ -71,6 +71,9 @@ export default class RoomClient // Socket.io peer connection this._signalingSocket = io(signalingUrl); + if (this._device.flag === 'firefox') + ROOM_OPTIONS = Object.assign({ iceTransportPolicy: 'relay' }, ROOM_OPTIONS); + // mediasoup-client Room instance. this._room = new mediasoupClient.Room(ROOM_OPTIONS); this._room.roomId = roomId; @@ -144,7 +147,7 @@ export default class RoomClient // Add keypress event listner on document document.addEventListener('keypress', (event) => { - const key = String.fromCharCode(event.keyCode); + const key = String.fromCharCode(event.which); const source = event.target; @@ -160,6 +163,21 @@ export default class RoomClient { this._dispatch(stateActions.toggleAdvancedMode()); this.notify('Toggled advanced mode.'); + break; + } + + case '1': // Set democratic view + { + this._dispatch(stateActions.setDisplayMode('democratic')); + this.notify('Changed layout to democratic view.'); + break; + } + + case '2': // Set filmstrip view + { + this._dispatch(stateActions.setDisplayMode('filmstrip')); + this.notify('Changed layout to filmstrip view.'); + break; } } } @@ -213,9 +231,9 @@ export default class RoomClient if (called) return; called = true; - callback(new Error('Callback timeout')); + callback(new Error('Request timeout.')); }, - 5000 + ROOM_OPTIONS.requestTimeout ); return (...args) => diff --git a/app/lib/components/Chat/Chat.jsx b/app/lib/components/Chat/Chat.jsx index 33d3d53..20f330c 100644 --- a/app/lib/components/Chat/Chat.jsx +++ b/app/lib/components/Chat/Chat.jsx @@ -58,7 +58,7 @@ Chat.propTypes = Chat.defaultProps = { senderPlaceHolder : 'Type a message...', - autofocus : true, + autofocus : false, displayName : null }; diff --git a/app/lib/components/FullScreenView.jsx b/app/lib/components/FullScreenView.jsx index d47ffda..0b3d2cb 100644 --- a/app/lib/components/FullScreenView.jsx +++ b/app/lib/components/FullScreenView.jsx @@ -56,7 +56,6 @@ const FullScreenView = (props) => videoTrack={consumer ? consumer.track : null} videoVisible={consumerVisible} videoProfile={consumerProfile} - toggleFullscreen={() => toggleConsumerFullscreen(consumer)} /> ); diff --git a/app/lib/components/FullView.jsx b/app/lib/components/FullView.jsx index 96b1f0f..ee64aa6 100644 --- a/app/lib/components/FullView.jsx +++ b/app/lib/components/FullView.jsx @@ -84,8 +84,7 @@ export default class FullView extends React.Component FullView.propTypes = { - videoTrack : PropTypes.any, - videoVisible : PropTypes.bool, - videoProfile : PropTypes.string, - toggleFullscreen : PropTypes.func.isRequired + videoTrack : PropTypes.any, + videoVisible : PropTypes.bool, + videoProfile : PropTypes.string }; diff --git a/app/lib/components/Peer.jsx b/app/lib/components/Peer.jsx index fc11ce3..ee0861f 100644 --- a/app/lib/components/Peer.jsx +++ b/app/lib/components/Peer.jsx @@ -39,6 +39,7 @@ class Peer extends Component onMuteMic, onUnmuteMic, toggleConsumerFullscreen, + toggleConsumerWindow, style } = this.props; @@ -126,6 +127,15 @@ class Peer extends Component }} /> +
incompatible video
+