ConnectyCube / connectycube-js-sdk-releases

Releases materials for ConnectyCube JS SDK platform https://connectycube.com
9 stars 2 forks source link

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

Closed Unixon-solutions closed 4 years ago

Unixon-solutions commented 4 years ago

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 commented 4 years ago

@Unixon-solutions thanks for reporting

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

Unixon-solutions commented 4 years ago

Its IOS WKWebView

DaveLomber commented 4 years ago

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 commented 4 years ago

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

Unixon-solutions commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

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

Unixon-solutions commented 4 years ago

key: "getUserMedia", inside this function

DaveLomber commented 4 years ago

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 commented 4 years ago

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

DaveLomber commented 4 years ago

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

Unixon-solutions commented 4 years ago

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 commented 4 years ago

We are checking re 'onRemoteStreamListener' Will update soon

DaveLomber commented 4 years ago

A link to 'onRemoteStreamListener' issue root cause https://github.com/cordova-rtc/cordova-plugin-iosrtc/issues/505

DaveLomber commented 4 years ago

@Unixon-solutions please apply this solution https://github.com/cordova-rtc/cordova-plugin-iosrtc/issues/505#issuecomment-626132977

It should fix the 'onRemoteStreamListener' issue.

Unixon-solutions commented 4 years ago

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

DaveLomber commented 4 years ago

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

Unixon-solutions commented 4 years ago

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

DaveLomber commented 4 years ago

@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 commented 4 years ago

We going to handle missing getSetilting here https://github.com/cordova-rtc/cordova-plugin-iosrtc/issues/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 commented 4 years ago

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