Skip to content
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

Mobile browser as a client #21

Closed
gamecln277 opened this issue May 13, 2020 · 11 comments · Fixed by #24
Closed

Mobile browser as a client #21

gamecln277 opened this issue May 13, 2020 · 11 comments · Fixed by #24

Comments

@gamecln277
Copy link

have any possible to let phone use?
I use it to drag phone ,web page will move....

@drauggres
Copy link
Collaborator

You should be able to just click on the image to generate input events.
Have you tried original scrcpy, does it work?

@gamecln277
Copy link
Author

Yes , it work fine
But I need to use phone to control many emu.
so I very hope this software can work in my requirement...please

@drauggres
Copy link
Collaborator

So, you are using browser on a smartphone to open ws-scrcpy web page, is that correct?
I never tried to open it on a phone. I'm not sure that it's possible to use scroll/drag in ws-scrcpy on a common browser on a phone.

@drauggres drauggres changed the title about use phone to control web Mobile browser as a client May 13, 2020
@gamecln277
Copy link
Author

YES!thst is I mean!
If web screen can fullscreen,maybe It will work fine?
I guess

@gamecln277
Copy link
Author

If look likes this

@gamecln277
Copy link
Author

I have a idea
If page design like this
maybe it will looks very wonderful!
and last fix the drag and scale problem

@drauggres
Copy link
Collaborator

I think that these lines inserted here should solve problem with drag (but I didn't test):

document.body.ondragstart = function(e: MouseEvent): void {
    e.preventDefault();
    e.stopPropagation();
};

P.S. Or adding draggable="false" attribute to the elements.

@gamecln277
Copy link
Author

gamecln277 commented May 18, 2020

document.body.onmousedown = function(e: MouseEvent): void { down++; onMouseEvent(e); }; document.body.onmouseup = function(e: MouseEvent): void { onMouseEvent(e); down--; }; document.body.onmousemove = function(e: MouseEvent): void { onMouseEvent(e); }; document.body.ondragstart = function(e: MouseEvent): void { e.preventDefault(); e.stopPropagation(); }; this.hasListeners = true;

I insert them but nothing change QQ

draggable="false"
this IDK where can I insert ...

picture

@santhoshbs1987
Copy link

I think that these lines inserted here should solve problem with drag (but I didn't test):

document.body.ondragstart = function(e: MouseEvent): void {
    e.preventDefault();
    e.stopPropagation();
};

P.S. Or adding draggable="false" attribute to the elements.

this did not work for me, please help with the working code

@santhoshbs1987
Copy link

document.body.onmousedown = function(e: MouseEvent): void { down++; onMouseEvent(e); }; document.body.onmouseup = function(e: MouseEvent): void { onMouseEvent(e); down--; }; document.body.onmousemove = function(e: MouseEvent): void { onMouseEvent(e); }; document.body.ondragstart = function(e: MouseEvent): void { e.preventDefault(); e.stopPropagation(); }; this.hasListeners = true;

I insert them but nothing change QQ

draggable="false"
this IDK where can I insert ...

picture

did you get the solution?

drauggres added a commit that referenced this issue Jun 27, 2020
@drauggres drauggres linked a pull request Jun 28, 2020 that will close this issue
5 tasks
@pat993
Copy link

pat993 commented Jul 5, 2020

thanks for adding more feature, it now works on touch device, you guys did a great job

drauggres added a commit that referenced this issue Jul 7, 2020
maxduke pushed a commit to maxduke/ws-scrcpy that referenced this issue Aug 10, 2023
DEV-13492 [Ramiel] 2021-11-24 키보드 이슈
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants