triniwiz / nativescript-webrtc

Apache License 2.0
42 stars 25 forks source link

Is there any plain Javascript demo available? #30

Open thecicada opened 4 years ago

thecicada commented 4 years ago

Hi @triniwiz triniwiz Is there any plain JavaScript demo available?

triniwiz commented 4 years ago

No but it should not be similar to the typescript demo

thecicada commented 4 years ago

Thanks for your quick response.

Kinda having hard time adding it to my project, I didn't have issue with the installation but I can't get it to work. video is not streaming on the screen, can't even see my local camera streaming on the screen. It would be great if you'd help with how to implement those files as plain JS: call-page.xml, call-page.js, call-view-model.js

Thank you.

adekunle11 commented 3 years ago

Hello, i would appreciate this also. thanks

triniwiz commented 3 years ago

I can try fitting in on the next update

adekunle11 commented 3 years ago

@triniwiz thank you very much!! i wish you could see how happy i am hearing that Please when should we be expecting the next update?

adekunle11 commented 3 years ago

@triniwiz i just noticed another error in nativesrcript core JS. The app crashes on launch, the error is:

An uncaught Exception occurred on "pool-2-thread-1" thread.
co/fitcom/fancywebrtc/FancyWebRTCEglUtils

StackTrace:
java.lang.VerifyError: co/fitcom/fancywebrtc/FancyWebRTCEglUtils
    at co.fitcom.fancywebrtc.FancyWebRTC.lambda$init$0(FancyWebRTC.java:93)
    at co.fitcom.fancywebrtc.-$$Lambda$FancyWebRTC$jFoisGouehK4C4J-BYA5BfOZep4.run(lambda)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:841)

this is my app.js

const application = require("tns-core-modules/application");
var Vibrate = require("nativescript-vibrate").Vibrate;
const appSettings = require("tns-core-modules/application-settings");
require("./async-await.js");
var vibrator = new Vibrate();
import { ImageCacheIt } from 'nativescript-image-cache-it';
import { WebRTC } from 'nativescript-webrtc-plugin';
ImageCacheIt.enableAutoMM();

if (application.android) {
    application.android.on(application.AndroidApplication.activityBackPressedEvent, backEvent);
}
function backEvent(args) {
    //args.cancel = true;
    if (appSettings.getBoolean("vibrationSwitch") === true) {
        vibrator.vibrate(25);
    } 
}
WebRTC.init();
application.run({ moduleName: "app-root" });
triniwiz commented 3 years ago

I'm currently trying to update all the plugins to support {N} v7 , I'm trying to complete the list before publishing about your issue please share the error

adekunle11 commented 3 years ago

I'm currently trying to update all the plugins to support {N} v7 , I'm trying to complete the list before publishing about your issue please share the error

Alright, i have edited the comment

triniwiz commented 3 years ago

Ah thanks did you add this ?

adekunle11 commented 3 years ago

Ah thanks did you add this ?

I added it as :

  compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
  }

That's how it is in the documentation, but i'm changing it to this:

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }

Will let you know the outcome shortly

adekunle11 commented 3 years ago

@triniwiz unfortunately, its the same issue

triniwiz commented 3 years ago

Can you try running the demo ?

adekunle11 commented 3 years ago

Its giving me so many errors, not the app the build, i'm used to using Nativescript core JAVASCRIPT, i had to create a typescript project to test this so i'm not used to typescript development Capture

adekunle11 commented 3 years ago

Can you try running the demo ?

Hello, any update?

triniwiz commented 3 years ago

I’ll take a look and try setting up a js project 

Sent from Yahoo Mail for iPhone

On Sunday, October 11, 2020, 2:20 PM, adekunle11 notifications@github.com wrote:

Can you try running the demo ?

Hello, any update?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

adekunle11 commented 3 years ago

I’ll take a look and try setting up a js project  Sent from Yahoo Mail for iPhone On Sunday, October 11, 2020, 2:20 PM, adekunle11 notifications@github.com wrote: Can you try running the demo ? Hello, any update? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Thanks a lot!

adekunle11 commented 3 years ago

hello @triniwiz just checking in to see if there's any progress

triniwiz commented 3 years ago

@adekunle11 not yet but soon I'm still on stripe atm finalizing the new api

adekunle11 commented 3 years ago

Okay thanks @triniwiz

adekunle11 commented 3 years ago

Hello @triniwiz Hope you're good Any update? tryna see if I can submit the app before next month

adekunle11 commented 3 years ago

Hello @triniwiz I set up a Nativescript core typescript project and its still giving the pool thread error This is my app.gradle

android {
  defaultConfig {
    minSdkVersion 17
    generatedDensities = []
  }
  aaptOptions {
    additionalParameters "--no-version-vectors"
  }
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}

This is yours

android {
  compileSdkVersion 28
  defaultConfig {
    minSdkVersion 17
    generatedDensities = []
  }
  aaptOptions {
    additionalParameters "--no-version-vectors"
  }

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}

The only difference is compileSdkVersion 28. how important is that, could it be the issue?

triniwiz commented 3 years ago

Should not be a problem , I'll need to do some tests

adekunle11 commented 3 years ago

Don't think you need to anymore, i was going through the closed issues and i saw on that said i should set my minSdkVersion to 24 now the app launches but that means it won't work on my android 4.3 anymore so i'm testing with google's apkonline. so far so good. i didn't want to say anything until i actually tested that its working. so i'm integrating now. How about the plain Javascript demo? @triniwiz