@ioiotv/io-react
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "@ioiotv/io-react", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Player for ioio.tv services", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -145,3 +145,3 @@ import { findDOMNode } from "react-dom" | ||
return function Keypress ( e ) { | ||
let v, update; | ||
let v, update, allowed; | ||
@@ -164,3 +164,4 @@ const ctrlKeys = me.logic.CONTROL_KEYS ( e ); | ||
case 'G': | ||
if ( me.state.render !== STAGE.CHANNEL_PLAY ) return | ||
allowed = me.logic.ALLOW_GUIDE ( me.state.render ); | ||
if ( !allowed ) return | ||
me.toggleOverlay () | ||
@@ -195,3 +196,4 @@ break | ||
case 'I': | ||
if ( me.state.render !== STAGE.CHANNEL_PLAY ) return | ||
allowed = me.logic.ALLOW_INFO ( me.state.render ) | ||
if ( !allowed ) return | ||
if ( me.state.render === STAGE.INFO ) me.hidePlayerInfo (me)() | ||
@@ -198,0 +200,0 @@ else me.showPlayerInfo (me)() |
@@ -13,6 +13,8 @@ const LOGIC_BLOCKS = ({ STAGE, config }) => ({ | ||
, EPG_LOADED : D => !D.internalState.isEpgLoading | ||
, CONTROL_KEYS : e => { | ||
const { altKey, ctrlKey, shiftKey, metaKey } = e; | ||
return ( altKey || ctrlKey || shiftKey || metaKey ) | ||
} | ||
, CONTROL_KEYS : e => { | ||
const { altKey, ctrlKey, shiftKey, metaKey } = e; | ||
return ( altKey || ctrlKey || shiftKey || metaKey ) | ||
} | ||
, ALLOW_GUIDE : render => ( render === STAGE.CHANNEL_PLAY ) || ( render === STAGE.EPG ) | ||
, ALLOW_INFO : render => ( render === STAGE.CHANNEL_PLAY ) || ( render === STAGE.INFO ) | ||
}) | ||
@@ -19,0 +21,0 @@ |
713688
2567