@24i/bigscreen-sdk 1.0.8-alpha.2183 → 1.0.8-alpha.2184

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@24i/bigscreen-sdk",
3
- "version": "1.0.8-alpha.2183",
3
+ "version": "1.0.8-alpha.2184",
4
4
  "description": "SmartApps BIGscreen SDK monorepo",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -384,3 +384,7 @@ export const GAMEPAD_A = new Key({
384
384
  export const GAMEPAD_B = new Key({
385
385
  id: 'GAMEPAD_B',
386
386
  });
387
+
388
+ export const SUBTITLES = new Key({
389
+ id: 'SUBTITLES',
390
+ });
@@ -38,4 +38,5 @@ export const KEYMAP = {
38
38
  KP_9: 105,
39
39
  CHANNEL_UP: 33,
40
40
  CHANNEL_DOWN: 34,
41
+ SUBTITLES: 83,
41
42
  };
@@ -82,4 +82,6 @@ export type KeycodeKeyMap = {
82
82
 
83
83
  GAMEPAD_A: number,
84
84
  GAMEPAD_B: number,
85
+
86
+ SUBTITLES: number,
85
87
  };
@@ -9,6 +9,14 @@ export const getKeyMap = () => {
9
9
  VOL_UP: { code: 'KeyU', keyCode: 85 },
10
10
  VOL_DOWN: { code: 'KeyJ', keyCode: 74 },
11
11
  MUTE: { code: 'KeyM', keyCode: 77 },
12
+ PLAY: { code: 'KeyO', keyCode: 79 },
13
+ PAUSE: { code: 'KeyP', keyCode: 80 },
14
+ PLAYPAUSE: { code: 'Space', keyCode: 32 },
15
+ FF: { code: 'Period', keyCode: 190 },
16
+ REW: { code: 'Comma', keyCode: 188 },
17
+ STOP: { code: 'Escape', keyCode: 27 },
18
+ SUBTITLES: { code: 'KeyS', keyCode: 83 },
19
+ REC: { code: 'KeyI', keyCode: 73 },
12
20
  });
13
21
  return generateKeyCodeKeyMap();
14
22
  };
@@ -23,6 +23,7 @@ type Props = {
23
23
  onClose?: () => void,
24
24
  onHide?: () => void,
25
25
  isPauseAllowed?: () => boolean,
26
+ showSubtitlesPicker?: () => void,
26
27
  };
27
28
 
28
29
  export class PlayerUI extends Component<Props>
@@ -84,10 +85,19 @@ export class PlayerUI extends Component<Props>
84
85
  STOP: this.onKeyStop,
85
86
  FF: this.onKeyForward,
86
87
  REW: this.onKeyRewind,
88
+ SUBTITLES: this.onKeySubtitles,
87
89
  });
88
90
  if (processed && !FF.is(event) && !REW.is(event)) stopEvent(event);
89
91
  };
90
92
 
93
+ onKeySubtitles = () => {
94
+ const { showSubtitlesPicker } = this.props;
95
+ if (showSubtitlesPicker) {
96
+ showSubtitlesPicker();
97
+ }
98
+ return true;
99
+ };
100
+
91
101
  onKeyPlay = () => {
92
102
  if (this.seeking.isSeeking()) {
93
103
  this.seeking.confirmSeek();