-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PLAYER-19] keybinding (post refacto dialog) #82
Merged
Merged
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e67547a
[enhanced] focus on clipboardinput when open dialog
jparez adf4417
somes refacto (keyboard start / stop listening), ... and keymapping s…
jparez 27efda7
keymapping with multitouch (dpad, swipe, tap)
jparez bb2733d
refacto apimanager, adding category + adding fullscren api
jparez 0f2f58b
set keyboardmapping default at false
jparez ca11d54
adding toolbar icon and fix reacticate issue
jparez 97c8341
refacto keymapping motor. Simple mouse integration but works like a c…
jparez 6225eb8
update eslint rule
jparez 945ec43
cleanup ebug and test trace
jparez 878896d
refacto enable/disable mouse event + keymaaping has his own mouse lis…
jparez 79a0831
light refacto
jparez 9636952
update readme with keymapping and api doc
jparez 3e80de7
keymapping documentation
jparez f9f7af6
handle pr comments
jparez 9cc3cb4
chang icon name for consistency : ic_keymapping_disabled => ic_keyma…
jparez 6965a6c
fix issue with clipboard dialog (events not properly send)
jparez 1d08aa5
fix wording issue
jparez a5d6da7
fix wording on apiManager's descriptions
jparez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ const Screencast = require('./plugins/Screencast'); | |
const StreamResolution = require('./plugins/StreamResolution'); | ||
const CoordinateUtils = require('./plugins/CoordinateUtils'); | ||
const KeyboardEvents = require('./plugins/KeyboardEvents'); | ||
const KeyboardMapping = require('./plugins/KeyboardMapping'); | ||
const MouseEvents = require('./plugins/MouseEvents'); | ||
const PeerConnectionStats = require('./plugins/PeerConnectionStats'); | ||
const Gamepad = require('./plugins/Gamepad'); | ||
|
@@ -52,10 +53,7 @@ module.exports = class DeviceRenderer { | |
this.initialized = false; | ||
this.reconnecting = false; | ||
|
||
// Enabled features | ||
this.keyboardEventsEnabled = false; | ||
this.touchEventsEnabled = false; | ||
this.mouseEventsEnabled = false; | ||
this.gamepadEventsEnabled = false; | ||
|
||
// Websocket | ||
|
@@ -88,17 +86,6 @@ module.exports = class DeviceRenderer { | |
// last accessed x/y position | ||
this.x = 0; | ||
this.y = 0; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Click handler handle has been move to overlayplugin class (decoupling) |
||
this.clickHandlerCloseOverlay = (event) => { | ||
if ( | ||
event.target.closest('.gm-overlay') === null && | ||
!event.target.classList.contains('gm-icon-button') && | ||
!event.target.classList.contains('gm-dont-close') | ||
) { | ||
this.store.dispatch({type: 'OVERLAY_OPEN', payload: {toOpen: false}}); | ||
} | ||
}; | ||
this.addListener(document, 'click', this.clickHandlerCloseOverlay); | ||
} | ||
|
||
/** | ||
|
@@ -119,6 +106,7 @@ module.exports = class DeviceRenderer { | |
{enabled: this.options.streamResolution, class: StreamResolution}, | ||
{enabled: this.options.touch || this.options.mouse, class: CoordinateUtils}, | ||
{enabled: this.options.keyboard, class: KeyboardEvents}, | ||
{enabled: this.options.keyboardMapping, class: KeyboardMapping}, | ||
{enabled: this.options.mouse, class: MouseEvents}, | ||
{ | ||
enabled: this.options.gamepad, | ||
|
@@ -482,14 +470,6 @@ module.exports = class DeviceRenderer { | |
this.touchEvents.addTouchCallbacks(); | ||
} | ||
|
||
if (this.mouseEventsEnabled) { | ||
this.mouseEvents.addMouseCallbacks(); | ||
} | ||
|
||
if (this.keyboardEventsEnabled) { | ||
this.keyboardEvents.addKeyboardCallbacks(); | ||
} | ||
|
||
if (this.gamepadEventsEnabled) { | ||
this.gamepadManager.addGamepadCallbacks(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a category for API manager exposed fn => window.player.media.mute()