triniwiz / nativescript-webrtc

Apache License 2.0
42 stars 25 forks source link

new WebRTC({ enableVideo:true, enableAudio:true }); results in a JAVA ERROR. #42

Open dmitryr117 opened 4 years ago

dmitryr117 commented 4 years ago

Problem issuing new WebRTC({ enableVideo:true, enableAudio:true }); I am usin Angular to develop NativeScript app. Upon issuing the command above I get the following error:

ERROR Error: java.lang.Exception: Failed resolving constructor for class 'co.fitcom.fancywebrtc.FancyWebRTC' with 3 parameters. Check the number and type of arguments.

Primitive types need to be manually wrapped in their respective Object wrappers.

If you are creating an instance of an inner class, make sure to always provide reference to the outer 'this' as the first argument.

Any thoughts on how to fix this?

triniwiz commented 4 years ago

Use the newer api

dmitryr117 commented 4 years ago

What minimum API version does it require? I tried minSdkVersion 28, but the error persists.

dmitryr117 commented 4 years ago

Ok. The reason why it was not working is because I did not put the iceServers argument there.

triniwiz commented 4 years ago

I was talking about this