Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: e.getSettings is not a function. (In 'e.getSettings()', 'e.getSettings' is undefined #21

Closed
Unixon-solutions opened this issue Apr 29, 2020 · 22 comments

Comments

@Unixon-solutions
Copy link

Unixon-solutions commented Apr 29, 2020

I am getting this error when trying to call getUserMedia on IOS in case of video conference call
In android there is no such issue.

Please let me know what's the fix for this issue

@DaveLomber
Copy link
Contributor

DaveLomber commented Apr 29, 2020

@Unixon-solutions thanks for reporting

is it about iOS Safari browser (which Safari version) or iOS Cordova web view?

@Unixon-solutions
Copy link
Author

Its IOS WKWebView

@DaveLomber
Copy link
Contributor

Thanks

so this about Cordova iOS RTC plugin

and where 'getSettings' is still in todo
https://github.com/cordova-rtc/cordova-plugin-iosrtc/blob/master/docs/iosrtc.md#iosrtcmediastreamtrack

Anyway,
we found 2 places where we use 'getSettings'

One of them is for logging purpose only, which we just removed safely

Another one is inside 'getUserMedia' which we are discussing internally what to do with it

Will keep you posted

@DaveLomber
Copy link
Contributor

@Unixon-solutions the issue is fixed
the new release will be pushed during next couple days max

@Unixon-solutions
Copy link
Author

Unixon-solutions commented Apr 30, 2020

RemoteStreamListener was not triggering on iOS in case of video conference call after I modify 'getUserMedia' function to fix 'e.getSettings()' issue.
will that work in new release ?

@DaveLomber
Copy link
Contributor

@Unixon-solutions we have released 3.0.3 version
Could you please upgrade and let us know whether the issue is resolved or not

@Unixon-solutions
Copy link
Author

Unixon-solutions commented May 5, 2020

Still getting same error for iOS
And there is a bug in 3.0.3 called "delete e.elementId;" then used e.elementId in attachMediaStream

Screenshot 2020-05-05 at 4 46 58 PM

Its working when I have commented delete e.elementId; and var r = e.getSettings(); but ConnectyCube.videochatconference.onRemoteStreamListener this was not triggered in iOS

Please check in iOS local stream and .onRemoteStreamListener both are not working for video conference.

@DaveLomber
Copy link
Contributor

could you please let us know where exactly you commented these lines

@Unixon-solutions
Copy link
Author

key: "getUserMedia", inside this function

@DaveLomber
Copy link
Contributor

You also can try 3.0.4

Here we have the following code:

const trackSetting = (!track.getSettings || Utils.getEnv().reactnative) ? null : track.getSettings()

so if getSettings is not available then it should not be called

@Unixon-solutions
Copy link
Author

3.0.4 is not working
Not getting error but still not getting device media
Please check in iOS

@DaveLomber
Copy link
Contributor

Please try 3 0 6
it should work well - I just checked it

@Unixon-solutions
Copy link
Author

I have tried 3.0.6
It worked when I commented this line "delete e.elementId;"

And still onRemoteStreamListener is not triggering in iOS

@DaveLomber
Copy link
Contributor

We are checking re 'onRemoteStreamListener'
Will update soon

@DaveLomber
Copy link
Contributor

A link to 'onRemoteStreamListener' issue root cause cordova-rtc/cordova-plugin-iosrtc#505

@DaveLomber
Copy link
Contributor

@Unixon-solutions please apply this solution cordova-rtc/cordova-plugin-iosrtc#505 (comment)

It should fix the 'onRemoteStreamListener' issue.

@Unixon-solutions
Copy link
Author

Should I just use https://webrtchacks.github.io/adapter/adapter-latest.js
or I need to modify it ?

@DaveLomber
Copy link
Contributor

Just put the mentioned code after iosrtc.registerGlobals();

@Unixon-solutions
Copy link
Author

Unixon-solutions commented May 9, 2020

I have loaded adapter-latest.js after iosrtc.registerGlobals();
Its still not working
Can you please send me updated adapter-latest.js ?

@DaveLomber
Copy link
Contributor

@Unixon-solutions please try this sample https://github.com/ConnectyCube/connectycube-cordova-samples/tree/master/sample-videochat-conf-cordova

both getSettings and on remote stream are fixed

the only one issue we still face is that on iOS the streams are displayed behind body el

To fix it - Need to call iosrtc.refreshVideos() at some place

We are working on it

@hthetiot
Copy link

We going to handle missing getSetilting here cordova-rtc/cordova-plugin-iosrtc#482

Note if you have to call iosrtc.refreshVideos() it might be you doing something out of order because the plug-in should trigger it on DOM change automatically. Feel free to fill an issue if you can.

@Unixon-solutions
Copy link
Author

Unixon-solutions commented May 11, 2020

@DaveLomber applyShimOnTrack(); worked for iOS.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants