Comparing version 3.2.1 to 3.3.0
@@ -11,5 +11,8 @@ /** | ||
var app = require('spa-app/lib/core'), | ||
events = require('spa-app/lib/events'); | ||
events = require('spa-app/lib/events'), | ||
keys = require('stb-keys'), | ||
originalKeydownHandler = events.keydown; | ||
// get instance | ||
@@ -53,2 +56,18 @@ window.core = window.parent.getCoreInstance(window, app); | ||
if ( TARGET === 'android-stb' || TARGET === 'android-app' ) { | ||
keys.play = 'MediaPlay'; | ||
keys.pause = 'MediaPause'; | ||
events.keydown = function ( event ) { | ||
if ( event.key === keys.play ) { | ||
event = {keyCode: keys.play, type: 'keydown'}; | ||
} else if ( event.key === keys.pause ) { | ||
event = {keyCode: keys.pause, type: 'keydown'}; | ||
} | ||
originalKeydownHandler(event); | ||
}; | ||
} | ||
/** | ||
@@ -55,0 +74,0 @@ * Show app. |
{ | ||
"name": "mag-app", | ||
"version": "3.2.1", | ||
"version": "3.3.0", | ||
"description": "MAG SDK application core.", | ||
@@ -5,0 +5,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22038
595