Comments (8)
FYI - I was able to hack something together by editing inputhandler.py, but it is VERY specialized to the RPi official 7" 800x480 screen with exactly 4 streams being shown. I only got the double click part working and it can be a bit flakey
Basically, in your event loop I added listening for BTN_TOUCH and EV_ABS. Any time I get a new position with ABS_X or ABS_Y I store it off.
I check for two clicks (BTN_TOUCH) events within 500ms of each other to declare a double click. If so and if we're already full screen, I inject a "0" keypress events into your queue to go back to the grid. If we're already in a grid, I inject a 1-4 keypress based on dividing the screen into quadrants and the most recent position reading to full screen the right stream.
It can be a bit flakey on the injection for some reason. It always detects the double click, but it seems that the event doesn't always cause an action to take place.
So, like I said, very specialized to that screen only (not a general screen and not a mouse) and to a 2x2 setup, but it could definitely be generalized. And maybe there is a more efficient way to trigger the events than injecting a fake keypress into the queue
from camplayer.
@jschwerdlin Thanks for sharing, I may implement something similar for V2.
from camplayer.
FYI - I did fork your code and have committed into my fork so you can see the mods (I didn't do a pull request though). I fixed the flakey event injection and also was able to add swipe left/right support to change pages.
from camplayer.
@raspicamplayer If you do get round to implementing such. I would suggest a mouse driver. My guess is that would also work for the touch screen, and it would work for normal monitors too, a cheap (wireless) mouse mouse is easier/cheaper/smaller to have nearby each monitor then a keyboard.
I am trying to figure out myself how to do this, but I am a bit of a noob in python. But I did get one fix/PR already, so who knows.
from camplayer.
I made a PR with a mouse gesture driver. #49
Somewhat similar to above, contained in InputHandler and injecting keystrokes. But using relative instead of absolute positioning. It should work for all grids and screen sizes.
from camplayer.
@jschwerdlin I've just used your fork and it works great on a 1600x1200 touchscreen. @raspicamplayer thanks for making this great software.
from camplayer.
@Wilksj01 Glad you found it helpful. I'm guessing you had to make some mods though since the coordinate division is extremely tied to the 800x480 Pi screen, though I think it would be a really simple mod to work on a larger screen
from camplayer.
@jschwerdlin I just changed the lines where you listed the rules for upper left lower left etc with my resolution i.e. 800 for x rather than 400.
from camplayer.
Related Issues (20)
- Can't find out how to set resolution
- camplayer not displaying videos
- config.ini
- Can't play "some" RTSP streams HOT 32
- Configuring Two screen layouts in one screeen HOT 5
- Broken Pipe HOT 3
- Dual or second display HOT 1
- Issues on raspberry pi 4 with no link
- CAMPLAYER OS Boot Issues HOT 2
- Camplayer not adding streams
- WishLIst: Ability to display remotely through matrix rtsp
- Adding Custom Resolution (600x800) and 2 Window Layout
- OMXplayer is deprecated in Raspian Bullseye. HOT 1
- No Link - ffprobe exception: Command timed out after 10 seconds
- Camplayer Occasionally Showing Command Line
- Incorrect python version detected HOT 1
- This file is currently set to private - https://www.rpi-camplayer.com/download/ HOT 3
- Unsupported hardware with revision b03115 HOT 16
- How to rotate through layouts
- Abandoned? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camplayer.