cordova-rtc / cordova-plugin-iosrtc

Cordova iOS plugin exposing the WebRTC W3C API
MIT License
690 stars 338 forks source link

getUserMedia not handle audio audioContext.createMediaStreamSource #562

Open AlekseyPn opened 4 years ago

AlekseyPn commented 4 years ago

Versions affected

Description

Hi, I found what getUserMedia not handle this case, and in audio object not setted constraints. getUserMedia handle one of mandatory or optional {audio: optional: Array(2) 0: {label: "iPhone Микрофон"} 1: {sourceId: "Built-In Microphone"} video: mandatory: sourceId: "com.apple.avfoundation.avcapturedevice.built-in_video:1" optional: Array(7) 0: {minFrameRate: 30} 1: {maxFrameRate: 30} 2: {label: "Front Camera"} 3: {minMinBitrate: 3500} 4: {maxMinBitrate: 3500} 5: {minMaxBitrate: 5000} 6: {maxMaxBitrate: 5000}

I try fix bug local, but anyway got NotAllowedError, and if I disable audio, all works fine We use Flashphoner library for connect to server

Expected results

Video stream started

Actual results

Got NotAllowedError

AlekseyPn commented 4 years ago

UPD: I found error reason, it's throw from Flashphoner API by audioContext.createMediaStreamSource. But getUserMedia not handle my case anyway :)

hthetiot commented 4 years ago

iosRTC does not support audioContext.createMediaStreamSource from the iosRTC MediaStream

jrr8 commented 3 years ago

I tried using audioContext.createMediaStreamSource to record a MediaStream from iosRTC and then came across this post when debugging.

Does anyone have any ideas on how to record a MediaStream from iosRTC?

hthetiot commented 3 years ago

@jrr8 it's not supported for now. It will require lot of work to make it work.

hthetiot commented 3 years ago

Related https://github.com/cordova-rtc/cordova-plugin-iosrtc/issues/506

hthetiot commented 3 years ago

Some people solved it by using this plug-in to my understanding: https://github.com/edimuj/cordova-plugin-audioinput

jrr8 commented 3 years ago

Thank you. I saw that plugin too and was considering giving it a shot.

Just so my understanding is clear, an iosRTC MediaStream is probably not going to work with any web audio APIs (with the current version of the plugin). Is that right?

hthetiot commented 3 years ago

Yes audio is fake on iosRTC for now.

On Wed, Feb 17, 2021, 15:05 Riley Robertson notifications@github.com wrote:

Thank you. I saw that plugin too and was considering giving it a shot.

Just so my understanding is clear, an iosRTC MediaStream is probably not going to work with any web audio APIs (with the current version of the plugin). Is that right?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cordova-rtc/cordova-plugin-iosrtc/issues/562#issuecomment-780578920, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACDO5XVXOD5P6VNML5YK3S7PEMHANCNFSM4QM7PMQQ .