Comments (5)
This is an issue with Plex considering a touch command as two separate presses (mouse up and mouse down), I will look into a JavaScript rate limiting as a potential fix.
from improved-plex-mobile.
Ah, was doing some further testing as you wrote that, it occurs in the unmodified version as well.
from improved-plex-mobile.
That is correct, it is native Plex behavior. A work around may be hacky, which is part of the reason I've been procrastinating on it.
from improved-plex-mobile.
This does the job for me on my laptop, I'll need to upgrade my userscript to test on mobile.
I tried to make something that would be targeted as possible to reduce side effects, feel free to adapt this to something you like.
Edit: Mobile tested, works fine, leave a message if you implement this so I can remove it from the userscript.
document.getElementById('plex').addEventListener('touchstart', (e) => {
let resumeButton = document.querySelectorAll('button[data-qa-id="resumeButton"]')[0];
let pauseButton = document.querySelectorAll('button[data-qa-id="pauseButton"]')[0];
if (
resumeButton && resumeButton.contains(e.target) ||
pauseButton && pauseButton.contains(e.target)
) {
e.preventDefault();
}
});
from improved-plex-mobile.
Very interesting implementation, I was originally thinking of going the route of global rate limiting for touch events. But this is much more localized and functional. Will add it to plex_mobile.js
, much appreciated!
from improved-plex-mobile.
Related Issues (7)
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 improved-plex-mobile.