Code Monkey home page Code Monkey logo

Comments (5)

ibc avatar ibc commented on July 21, 2024

c9dd4db should implement this feature, but it does not work so I ask for help...

Basically this is the usage (according to the latest W3C spec):

var promise = iosrtc.mediaDevices.getUserMedia({
  audio: true,
  video: {
    width: { min: 320, max: 320 }
  }
}

But when the local video is generated and the libwebrtc ObjC wrapper emits didChangeVideoSize the resolution of the local video is the common/default one (640x480).

No idea where the issue is, I'm supposing to correctly follow the constraints API. Note however that the constraints stuff in the ObjC wrapper of libwebrtc is totally outdated (it still uses the mandatory/optional arrays), and maybe the given constraints are ignored by the native C++ API.

I've reported the issue in the libwebrtc project:

https://bugs.chromium.org/p/webrtc/issues/detail?id=5290

but I would appreciate any help from the community :)

from cordova-plugin-iosrtc.

1N50MN14 avatar 1N50MN14 commented on July 21, 2024

Have you tried the "old" syntax? i.e. something like {mandatory: {maxHeight: 640,minHeight: 480} maybe they have some sort of fallback? I think this is working on my build I'm going to check this out. By the way, your build does not generate needed H264 lines in the sdp offer.

from cordova-plugin-iosrtc.

AntonioCurci avatar AntonioCurci commented on July 21, 2024

I'll try to give also my support, but I want to share my experience with the constraints.
After a lot of tests, I noticed that the problem related to lags for old iDevices could be due to the minimum framerate and maximum one. If you try it, and profile it, you should see how the GPU performance goes up to 30-40 and immediately down to 4/5/8 frame per second: when it gets down to lower values, here it comes lag. It's like as, since the minimum and maximum are not set during the signaling, the older devices increase the performance more than how much they can handle.
So, maybe, adding the support to those two values, will solve the lag issue on old device (those two parameters are part of AVFoundation in iOS7 and later).
In fact, newer devices can handle an higher frame rate and the performance are stable.

I hope I got explained!

from cordova-plugin-iosrtc.

ibc avatar ibc commented on July 21, 2024

Have you tried the "old" syntax?

This is not about the JavaScript API syntax but about the Objective-C API.

By the way, your build does not generate needed H264 lines in the sdp offer.

Please report it in a separate issue :)

adding the support to those two values, will solve the lag issue on old device

frameRate is already implemented: f2d0efe

from cordova-plugin-iosrtc.

ibc avatar ibc commented on July 21, 2024

Video constraints are theoretically implemented in 2.2.0 but they are just ignored. Let's close this issue and handle the problem in #107.

@SirSeymour may you please confirm whether you were able to force video constraints using this plugin? May you please help on #107 by exposing your experience?

from cordova-plugin-iosrtc.

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.