OpenTelecom / WKWebViewRTC

MIT License
94 stars 30 forks source link

Mic is not working #18

Open Arpit160399 opened 3 years ago

Arpit160399 commented 3 years ago

when i use getuserMedia with constraints video false and audio true i did'nt receive any audio stream in there for test purpose i used the webrtc audio example: https://webrtc.github.io/samples/src/content/getusermedia/volume/

hthetiot commented 3 years ago

Mic is working, the issue is that WKWebViewRTC WebRTC does not support AudioContext.

teejayhh commented 3 years ago

I am having also issues getting this to work.

2021-07-29 11:27:22.718599+1000 SomeApp[310:13880] WKWebViewRTC#init()
2021-07-29 11:27:22.726263+1000 SomeApp[310:13880] iGetUserMedia#init()
2021-07-29 11:27:28.434840+1000 SomeApp[310:13914] [general] Connection to daemon was invalidated
2021-07-29 11:27:34.005838+1000 SomeApp[310:13913] [ProcessSuspension]  0x10c0c66e8 - ProcessAssertion() PID 310 Unable to acquire assertion for process with PID 312
2021-07-29 11:27:34.014662+1000 SomeApp[310:13880] [ProcessSuspension] 0x10c0c6698 - ProcessAssertion::processAssertionWasInvalidated()
2021-07-29 11:27:34.014695+1000 SomeApp[310:13880] [ProcessSuspension] 0x10c0c66e8 - ProcessAssertion::processAssertionWasInvalidated()
WKWebViewRTC#userContentController(). name=WKWebViewRTC
2021-07-29 11:27:37.605332+1000 SomeApp[310:13880] WKWebViewRTC#getUserMedia()
2021-07-29 11:27:37.605381+1000 SomeApp[310:13880] iGetUserMedia#call()
2021-07-29 11:27:37.607417+1000 SomeApp[310:13880] iGetUserMedia#call() | audio authorization: authorized
2021-07-29 11:27:37.608205+1000 SomeApp[310:13880] iGetUserMedia#call() | audio requested
2021-07-29 11:27:37.608378+1000 SomeApp[310:13880] iGetUserMedia#call() | chosen audio constraints: {
}
2021-07-29 11:27:37.609792+1000 SomeApp[310:13880] iMediaStream#init()
2021-07-29 11:27:37.609931+1000 SomeApp[310:13880] iMediaStreamTrack#init()
2021-07-29 11:27:37.610049+1000 SomeApp[310:13880] iMediaStreamTrack#run() [kind:audio, id:B147C3B6-75EB-46CC-A437-1ECB3C7219F5]
2021-07-29 11:27:37.610124+1000 SomeApp[310:13880] iMediaStream#run()
WKWebViewRTC#userContentController(). name=WKWebViewRTC
2021-07-29 11:27:37.637030+1000 SomeApp[310:13880] WKWebViewRTC#MediaStream_init()
2021-07-29 11:27:37.637082+1000 SomeApp[310:13880] WKWebViewRTC#MediaStream_init() | ERROR: pluginMediaStream with id=60F4D647-DF72-421A-8A37-FA3AC1FB458A already exist
WKWebViewRTC#userContentController(). name=WKWebViewRTC
2021-07-29 11:27:37.637165+1000 SomeApp[310:13880] WKWebViewRTC#MediaStream_setListener()
WKWebViewRTC#userContentController(). name=WKWebViewRTC
2021-07-29 11:27:37.637239+1000 SomeApp[310:13928] iMediaStream#setListener()
2021-07-29 11:27:37.637245+1000 SomeApp[310:13880] WKWebViewRTC#MediaStreamTrack_setListener()
2021-07-29 11:27:37.637270+1000 SomeApp[310:13928] iMediaStreamTrack#setListener() [kind:audio, id:B147C3B6-75EB-46CC-A437-1ECB3C7219F5]

Our web app has a button which you press and hold to record but as soon as you press it (without releasing) the js app errors. This works fine in mobile safari or ios14 and up. so I am not quite sure what I am missing.

UPDATE Noticed the problem, we access the AudioContext.destination property which then terminates the recording instantly.

hthetiot commented 3 years ago

Our web app has a button which you press and hold to record but as soon as you press it (without releasing) the js app errors.

This library does not support AudioContext and MediaRecorder, funny that you mention " js app error" but actually providing ios logs instead of the JS errors... Anyway Wont fix because cannot reproduce when the lib is used with it's know limitation properly. Finally if you can support ios 14+ you dont need this lib anymore.

teejayhh commented 3 years ago

I only wanted to demonstrate the app setup and the output in case something is not captured properly.

2021-07-29 11:27:37.637082+1000 SomeApp[310:13880] WKWebViewRTC#MediaStream_init() | ERROR: pluginMediaStream with id=60F4D647-DF72-421A-8A37-FA3AC1FB458A already exist

Perhaps you could document the known limitations so that people don't waste their time running into them.

hthetiot commented 3 years ago

Perhaps you could document the known limitations so that people don't waste their time running into them.

So that people don't waste their time 😅 Really you think you going to get help from open source free projet that you use for commercial purpose like that ? May be you should learn to code what you need by yourself instead of relying on other or better, look on what this project is actually based on and understand what it does by reading the code instead of pasting logs that have nothing to do with your issue.

I'm not even maintainer, i only helped because this project duplicated the source code of another my project (iosRTC), but people like you i eat them for breakfast, you simply do not deserve to be helped .

hthetiot commented 3 years ago

Noticed the problem, we access the AudioContext.destination property which then terminates the recording instantly.

Accesing AudioContext have nothing do to with recording stopping, MediaRecorder is simply not even compatible here with the MediaStream SHIM this project expose in the WebView.

It's funny to see people complain instead of helping or contributing about free software that intended to provide what apple failed to provide prior iOS 14.2. That usually what i call script kiddies that just copy paste code and open source without giving credit to the original works but are the first to complain like they paying for while In fact we give it to them for free, but they still complain.

teejayhh commented 3 years ago

I just ignore the comments from above, quite honestly a little childish. But thanks for your last input which was in fact useful.