Giter VIP home page Giter VIP logo

Comments (1)

drauggres avatar drauggres commented on July 26, 2024 1

Hi.
First of all: this project is only a prototype and could be used only as first step in your research (it is not ready for production in any way).

The client [where original scrscpy is available in Win/Mac/Linux binaries] is Chrome for Windows or any Chrome?

Any modern browser on any platform (I was able to run at least one of the decoders on Linux/Mac/Windows in Chrome/Safari/Firefox and also on Chrome/SamsungBrowser on Android).

show the screen of the real android device (only one eye) on the viewer device

For one-eye case there is a crop parameter: https://github.com/drauggres/ws-scrcpy/blob/cc991797e3989e866c19878993f391346a05063b/src/VideoSettings.ts#L15
But there is no way to set it from the current UI.
Also you can pass crop argument to scrcpy server ("no-crop" by default: "-", argument format: https://github.com/Genymobile/scrcpy#crop):

https://github.com/drauggres/ws-scrcpy/blob/cc991797e3989e866c19878993f391346a05063b/src/server/ServerDeviceConnection.ts#L12

and (bonus) send UI events from the viewer device to the real device's handlers.

Can't really comment on this, I don't know what events you may possibly need on Android VR Headset. Looks like totally different use case unlike smartphone/tablet.
You will probably need to modify scrcpy server to be able to inject your specific events.

The devices will be wired together via USB. A wifi network does not exist in the field, but if absolutely required to achieve our goals, could be provided.

You could forward websocket-server port to the client, since they are going to be connect via USB anyway. Something like adb forward tcp:8886 tcp:8886 and then connect to ws://127.0.0.1:8886

The client is ideally coded in a web codebase for Electron to make win/mac/linux chromium binaries and for Cordova to make iOS/android binaries.

This project consist of three parts:

  1. "Streaming server" on device (modified scrcpy)
  2. HTTP server on machine with adb server (this file).
  3. Web client

You don't need this specific (2) HTTP server, it is possible to use any other HTTP server to ship static clients files (I wanted to automatically install and run scrcpy on every device connected to the machine).
If you want the client to be web-based there is no need to package it in app, old-good web-site is fine.

Few important things to know:

  • scrcpy server is NOT installed on the device permanently
  • you MUST install and run it from adb (with Developer options enabled on the device)

Hope this helps.

from ws-scrcpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.