Open ahmetceylan opened 5 years ago
feat: https://github.com/triniwiz/nativescript-webrtc/commit/43d69a8ba1228ba7827b13827898f23cc1dfb400
@triniwiz so in alpha22, what is the best way to get access to the aspect ratio of the local video stream? For example, in the main page of the ng-demo-firestore
I am showing a preview of the local video stream, where I set the width to screen.mainScreen.widthDIPs/4
. However, I want to set the height to something that respects the aspectRatio, so how do I get the relative height?
In the context of these lines, I tried to do the following: console.dir(mediaStream.videoTracks[0].settings);
On Android I got the following output:
JS: ==== object dump start ====
JS: _mediaTrackSettings: co.fitcom.fancywebrtc.FancyRTCMediaTrackSettings@c70e655
JS: width: "640"
JS: height: "480"
JS: frameRate: "30000"
JS: aspectRatio: "1"
JS: facingMode: "user"
JS: ==== object dump end ====
Some questions:
frameRate
property here is 30fps (why does it report 30000?)aspectRatio
property is relative to what? Thanks!
Which platform(s) does your issue occur on?
Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
Can you please implement following properties of media track objects;
video tracks; aspectRatio facingMode frameRate height ** width
audio tracks; ** volume
and also, it would be good to have an event that is firing when the aspect ratio is changed