@applicaster/zapp-react-dom-app 13.0.0-alpha.2635505531 → 13.0.0-alpha.3334148221
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.
|
@@ -181,11 +181,6 @@ class InteractionManagerClass extends React.Component<Props, State> {
|
|
|
181
181
|
|
|
182
182
|
window.addEventListener("onLongPress", this.handleLongPress.bind(this));
|
|
183
183
|
|
|
184
|
-
window.addEventListener(
|
|
185
|
-
"onPressRelease",
|
|
186
|
-
this.handleLongPressRelease.bind(this)
|
|
187
|
-
);
|
|
188
|
-
|
|
189
184
|
window.addEventListener(
|
|
190
185
|
"onLongPressRelease",
|
|
191
186
|
this.handleLongPressRelease.bind(this)
|
|
@@ -350,8 +345,6 @@ class InteractionManagerClass extends React.Component<Props, State> {
|
|
|
350
345
|
}
|
|
351
346
|
|
|
352
347
|
onKeyDown(event) {
|
|
353
|
-
// console.log("Anton: event", event);
|
|
354
|
-
// debugger;
|
|
355
348
|
const { displayState, setDisplayState, navigator } = this.props;
|
|
356
349
|
const { isKeyboardVisible } = this.state;
|
|
357
350
|
|
|
@@ -379,7 +372,6 @@ class InteractionManagerClass extends React.Component<Props, State> {
|
|
|
379
372
|
When the player is displayed, we listen to Native Play / Pause / Stop
|
|
380
373
|
buttons. Any other key press will display the transport controls
|
|
381
374
|
*/
|
|
382
|
-
|
|
383
375
|
if (
|
|
384
376
|
displayState === DISPLAY_STATES.PLAYER ||
|
|
385
377
|
displayState === DISPLAY_STATES.HUD
|
|
@@ -412,20 +404,14 @@ class InteractionManagerClass extends React.Component<Props, State> {
|
|
|
412
404
|
return;
|
|
413
405
|
}
|
|
414
406
|
|
|
415
|
-
if (
|
|
416
|
-
keyCode(event).matches(KEYS.Forward) ||
|
|
417
|
-
keyCode(event).matches(KEYS.C)
|
|
418
|
-
) {
|
|
407
|
+
if (keyCode(event).matches(KEYS.Forward)) {
|
|
419
408
|
setDisplayState(DISPLAY_STATES.HUD);
|
|
420
409
|
this.props.seekMethods.onForwardPress();
|
|
421
410
|
|
|
422
411
|
return;
|
|
423
412
|
}
|
|
424
413
|
|
|
425
|
-
if (
|
|
426
|
-
keyCode(event).matches(KEYS.Rewind) ||
|
|
427
|
-
keyCode(event).matches(KEYS.Z)
|
|
428
|
-
) {
|
|
414
|
+
if (keyCode(event).matches(KEYS.Rewind)) {
|
|
429
415
|
setDisplayState(DISPLAY_STATES.HUD);
|
|
430
416
|
this.props.seekMethods.onRewindPress();
|
|
431
417
|
|
|
@@ -487,7 +473,7 @@ class InteractionManagerClass extends React.Component<Props, State> {
|
|
|
487
473
|
}
|
|
488
474
|
}
|
|
489
475
|
|
|
490
|
-
if (keyCode(event).matches(KEYS.Enter)
|
|
476
|
+
if (keyCode(event).matches(KEYS.Enter)) {
|
|
491
477
|
if (displayState === DISPLAY_STATES.PLAYER) {
|
|
492
478
|
setDisplayState(DISPLAY_STATES.HUD);
|
|
493
479
|
} else {
|
|
@@ -713,17 +699,14 @@ class InteractionManagerClass extends React.Component<Props, State> {
|
|
|
713
699
|
|
|
714
700
|
switch (keyCode) {
|
|
715
701
|
case KEYS.Forward.code:
|
|
716
|
-
case KEYS.C.code:
|
|
717
702
|
playbackState && this.props.seekMethods.onForwardLongPress();
|
|
718
703
|
break;
|
|
719
704
|
|
|
720
705
|
case KEYS.Rewind.code:
|
|
721
|
-
case KEYS.Z.code:
|
|
722
706
|
playbackState && this.props.seekMethods.onRewindLongPress();
|
|
723
707
|
break;
|
|
724
708
|
|
|
725
709
|
case KEYS.Enter.code:
|
|
726
|
-
case KEYS.X.code:
|
|
727
710
|
focusManager.longPress();
|
|
728
711
|
break;
|
|
729
712
|
}
|
|
@@ -733,35 +716,26 @@ class InteractionManagerClass extends React.Component<Props, State> {
|
|
|
733
716
|
const { keyCode } = event.detail;
|
|
734
717
|
this.longPressActive = false;
|
|
735
718
|
this.resetHudTimeout();
|
|
736
|
-
// debugger;
|
|
737
719
|
|
|
738
720
|
switch (keyCode) {
|
|
739
721
|
case KEYS.Forward.code:
|
|
740
|
-
case KEYS.C.code:
|
|
741
722
|
this.props.seekMethods.onForwardPressOut();
|
|
742
723
|
break;
|
|
743
724
|
|
|
744
725
|
case KEYS.Rewind.code:
|
|
745
|
-
case KEYS.Z.code:
|
|
746
726
|
this.props.seekMethods.onRewindPressOut();
|
|
747
727
|
break;
|
|
748
728
|
|
|
749
729
|
case KEYS.Enter.code:
|
|
750
|
-
case KEYS.X.code:
|
|
751
730
|
focusManager.pressOut();
|
|
752
731
|
break;
|
|
753
732
|
}
|
|
754
733
|
};
|
|
755
734
|
|
|
756
735
|
private keySupportsLongPress(event: KeyboardEvent): boolean {
|
|
757
|
-
return [
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
KEYS.Enter.code,
|
|
761
|
-
KEYS.Z.code,
|
|
762
|
-
KEYS.X.code,
|
|
763
|
-
KEYS.C.code,
|
|
764
|
-
].includes(event.code);
|
|
736
|
+
return [KEYS.Forward.code, KEYS.Rewind.code, KEYS.Enter.code].includes(
|
|
737
|
+
event.code
|
|
738
|
+
);
|
|
765
739
|
}
|
|
766
740
|
|
|
767
741
|
render() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-dom-app",
|
|
3
|
-
"version": "13.0.0-alpha.
|
|
3
|
+
"version": "13.0.0-alpha.3334148221",
|
|
4
4
|
"description": "Zapp App Component for Applicaster's Quick Brick React Native App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/applicaster/zapp-react-dom-app#readme",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@applicaster/zapp-react-dom-ui-components": "13.0.0-alpha.
|
|
26
|
-
"@applicaster/zapp-react-native-bridge": "13.0.0-alpha.
|
|
27
|
-
"@applicaster/zapp-react-native-redux": "13.0.0-alpha.
|
|
28
|
-
"@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.
|
|
29
|
-
"@applicaster/zapp-react-native-utils": "13.0.0-alpha.
|
|
25
|
+
"@applicaster/zapp-react-dom-ui-components": "13.0.0-alpha.3334148221",
|
|
26
|
+
"@applicaster/zapp-react-native-bridge": "13.0.0-alpha.3334148221",
|
|
27
|
+
"@applicaster/zapp-react-native-redux": "13.0.0-alpha.3334148221",
|
|
28
|
+
"@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.3334148221",
|
|
29
|
+
"@applicaster/zapp-react-native-utils": "13.0.0-alpha.3334148221",
|
|
30
30
|
"abortcontroller-polyfill": "^1.7.5",
|
|
31
31
|
"history": "^4.7.2",
|
|
32
32
|
"react-router-dom": "^5.1.2",
|