Merge branch 'RC1-1.0' of https://github.com/havfo/multiparty-meeting into RC1-1.0
commit
5339903a50
|
|
@ -115,6 +115,8 @@ export default class RoomClient
|
||||||
|
|
||||||
this._screenSharingProducer = null;
|
this._screenSharingProducer = null;
|
||||||
|
|
||||||
|
this._startKeyListener();
|
||||||
|
|
||||||
this._join({ displayName, device });
|
this._join({ displayName, device });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,6 +139,33 @@ export default class RoomClient
|
||||||
this._dispatch(stateActions.setRoomState('closed'));
|
this._dispatch(stateActions.setRoomState('closed'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_startKeyListener()
|
||||||
|
{
|
||||||
|
// Add keypress event listner on document
|
||||||
|
document.addEventListener('keypress', (event) =>
|
||||||
|
{
|
||||||
|
const key = String.fromCharCode(event.keyCode);
|
||||||
|
|
||||||
|
const source = event.target;
|
||||||
|
|
||||||
|
const exclude = [ 'input', 'textarea' ];
|
||||||
|
|
||||||
|
if (exclude.indexOf(source.tagName.toLowerCase()) === -1)
|
||||||
|
{
|
||||||
|
logger.debug('keyPress() [key:"%s"]', key);
|
||||||
|
|
||||||
|
switch (key)
|
||||||
|
{
|
||||||
|
case 'a': // Activate advanced mode
|
||||||
|
{
|
||||||
|
this._dispatch(stateActions.toggleAdvancedMode());
|
||||||
|
this.notify('Toggled advanced mode.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
login()
|
login()
|
||||||
{
|
{
|
||||||
const url = `/login?roomId=${this._room.roomId}&peerName=${this._peerName}`;
|
const url = `/login?roomId=${this._room.roomId}&peerName=${this._peerName}`;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue