Comments (8)
Does this problem appear in the original scrcpy?
If not, please attach a screenshot (or does it happen on the device?), I have never seen anything like what you describe.
from ws-scrcpy.
from ws-scrcpy.
Does it happen on all included decoders? Also what is the screen resolution of this device?
from ws-scrcpy.
I will try different decoders and check the resolution of the screen later. Thank you very much for your answer. I will contact you again if there is any question.
from ws-scrcpy.
In my tests, only Msedecoder was able to get images, and the device's resolution was 1080x2340.
from ws-scrcpy.
It's possible that video tag size does not match actual video size (like than you watch 16:9 video on 4:3 screen you will see the same).
Can you open developer tools while streaming and run in the console this:
var {videoWidth, videoHeight, clientWidth, clientHeight} = document.getElementsByTagName('video')[0];
console.log({videoWidth, videoHeight, clientWidth, clientHeight})
I tried with android emulator (with 1080x2340 resolution), but wasn't able to reproduce: videoWidth
and videoHeight
were always the same as clientWidth
and clientHeight
respectively.
As for only MseDecoder working, can you try #25 (comment), and post your results there?
P.S. Also what browser are you testing on?
from ws-scrcpy.
In the native scrcpy screen.c, I found this function and wonder if you have the same treatment in your project.
from ws-scrcpy.
Not the same:
- This project doesn't handle window resizing, everyting below happens only after the start or after
Change video settings
button is pressed. - Client receives
ScreenInfo
from the server:ws-scrcpy/src/DeviceConnection.ts
Lines 297 to 298 in 79098c6
3.1 For MseDecoder video tag size is not limited, but only size of its parent element:ws-scrcpy/src/decoder/Decoder.ts
Lines 203 to 217 in 79098c6
3.2 For other ("canvas based") decoders, the canvas is also resized:ws-scrcpy/src/decoder/CanvasCommon.ts
Lines 145 to 151 in 79098c6
The actual video size is never checked, as it is expected to match the value received in ScreenInfo
earlier, that is why I asked you run:
var {videoWidth, videoHeight, clientWidth, clientHeight} = document.getElementsByTagName('video')[0];
console.log({videoWidth, videoHeight, clientWidth, clientHeight})
so we could compare them.
P.S. you can post multiline code by surrounding it with triple backtick (`), or include direct permalink to github, e.g.:
https://github.com/NetrisTV/ws-scrcpy/blob/79098c69773cded80b58a4f0e7528fc4cbc9cdcd/src/decoder/CanvasCommon.ts#L145-L151
from ws-scrcpy.
Related Issues (20)
- Not able to use remotelly HOT 1
- rotation HOT 3
- Embedding in a project
- error while setting up HOT 2
- Error when pull files from sdcard folder in "list files" HOT 4
- The service crashed because of an error HOT 2
- REQUEST HELP - With spread action from one to multiple devices
- "createSetClipboardCommand" HOT 2
- issues with Android 14 HOT 8
- 这么传文件啊,就只有浏览器打开adb怎么连接 HOT 2
- unable to start project HOT 4
- TS2344: Type 'TE' does not satisfy the constraint 'EventMap'.
- Not able to use Remotely HOT 1
- Not be able to start app
- [StreamReceiver]. WS closed unexpectedly after a while HOT 1
- Cannot display adb connected devices HOT 1
- can't configure stream HOT 6
- Firefox exhibits lag when using player=mse (H264 Converter)
- can not restart device scrcpy server via adb wifi connection
- Issue with Android 14 display in pixel device HOT 4
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 ws-scrcpy.