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

Own audio shut down during video conference #749

Open
bonjourjoel opened this issue May 25, 2022 · 5 comments
Open

Own audio shut down during video conference #749

bonjourjoel opened this issue May 25, 2022 · 5 comments

Comments

@bonjourjoel
Copy link

YOU MUST read first!

Please use Community Forum for general technical discussions and questions.

  • [X ] I have used Google with the error message or bug in association with the library and Cordova words to make sure the issue I'm reporting is only related to iOSRTC.
  • [X ] I have provided steps to reproduce (e.g. using sample app code https://github.com/cordova-rtc/cordova-plugin-iosrtc-sample or updated extra/renderer-and-libwebrtc-tests.js file).
  • [ X] I have provided versions of third party library name, ios, Xcode and plugin version and adapter.js version if used.

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed, removing this checkbox will result in automatic closed issue.

Versions affected

  • Cordova version (e.g 7.1.0): 11.0.0
  • Cordova iOS version (e.g 5.1.0): 6.2.0
  • Plugin version (e.g 6.0.12): 8.0.1
  • iOS version (e.g 10.2): 12.5.5
  • Xcode version (e.g 11.1 - 11A1027): 12.4
  • WebRTC-adapter version (e.g. 7.4.0): 8.0.0
  • WebRTC Framework version (e.g. JSSip 3.1.2): I don't know what this is.

Description

When the iosrtc is playing a remote video with webrtc audio, the audios of my own application don't play any more. And when the iosrtc session ends, the audios of my application can play again, and i can hear them again.

Steps to reproduce

Play another sound using webkitAudioContext|AudioContext while a webrtc video is playing. And only the sound of webrtc video makes sound.

Expected results

Both should make sound.

Actual results

Only sound for webrtc.

More details:

I will put more details. Sorry if its too much, but this is what i've done and tried. Maybe you can point me my mistake with these informations.

  1. I have installed the plugin using this command: cordova plugin add cordova-plugin-iosrtc --variable MANUAL_INIT_AUDIO_DEVICE=TRUE
    If i don't use this variable TRUE, when i launch my app, all the sounds are very low: They are playing in the ear speaker. Both my sounds and the sounds of webrtc. But when I use this variable TRUE, both sounds play in the normal speaker when i start the app.

  2. Also i am using these commands when i receive the ice state "connected":
    initAudioDevices() + turnOnSpeaker(true)
    Because if I don't, then the sound of the rtc video conference is playing in the ear piece of the phone. But with these instructions, it seems to play in the speaker, except if an earphone is plugged in and then it plays in the earphone. This behaviour seems fine to me.
    But as i said; the audio of my app, doesn't play at all during the rtc sessions.

  3. One more detail that is unrelated, but i don't want to spam your forum, so i'll put it here: I can't find a way to mute temporarily the audio received. In javascript i use HTMLVideoElement.muted = true/false, but it doesn't have any effect with iosrtc. I couldn't find anything that could do it.

Thanks for your time!

@hthetiot hthetiot added this to the 8.0.x milestone May 25, 2022
@hthetiot
Copy link
Contributor

@bonjourjoel Try this workwaround by playing a valid silence audio file before,
#654 (comment)

@bonjourjoel
Copy link
Author

Hi, I'm already doing this. I'm using this to start the audio player on a first click on the login button. If I play several sounds, none play, neither the first, nor the second... So It's not the solution. The plugin is taking the audio system for itself, and it's not possible to use it, at least with Web audio api, at least in a normal way.

@hthetiot
Copy link
Contributor

hthetiot commented May 26, 2022 via email

@hthetiot
Copy link
Contributor

Could be fixed by #768 please test 8.0.4

@hthetiot
Copy link
Contributor

Ping @bonjourjoel please test 8.0.4

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

No branches or pull requests

2 participants