[iOS] webrtc in iOS with UIWebview with audio element make error

628 views
Skip to first unread message

何知翰

unread,
Dec 12, 2016, 6:18:52 AM12/12/16
to discuss-webrtc
hi,there. My iOS app is using webrtc to connect with video and audio.And there is a UIWebview to use for two people. And when UIWebview load a audio,and play it.
I can get error:

(RTCLogging.mm:31): (audio_device_ios.mm:442 OnGetPlayoutData): Expected 512 frames but got 1115
(RTCLogging.mm:31): (audio_device_ios.mm:377 OnDeliverRecordedData): Expected 512 frames but got 1115
(RTCLogging.mm:31): (audio_device_ios.mm:380 OnDeliverRecordedData): Session:
 RTCAudioSession: {
  category: AVAudioSessionCategoryPlayAndRecord
  categoryOptions: 1
  mode: AVAudioSessionModeVoiceChat
  isActive: 1
  sampleRate: 22050.00
  IOBufferDuration: 0.023220
  outputNumberOfChannels: 2
  inputNumberOfChannels: 1
  outputLatency: 0.001043
  inputLatency: 0.000272
}

And I can not listen each other.

webrtc version is 54.
Is there some method to fix this bug?

thanks!.

Henrik Andreasson

unread,
Dec 12, 2016, 7:13:58 AM12/12/16
to discuss-webrtc
It is difficult to say for sure given the we don't have access to your application.
Please use the AppRTCMobile demo application and try to reproduce using it and then file an issue in the WebRTC issue tracker.

Thanks

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/2dde46ec-e2ec-47d7-95fd-649ce71039c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

何知翰

unread,
Dec 30, 2016, 5:34:36 AM12/30/16
to discuss-webrtc
I modify the AppRTCMobile file.ARDVideoCallViewController.m add an UIWebView.
and play the sound in the webview.

Then rtc sound was lost.

And we try to plug the headset in iPhone.Or unplug the headset. AppRTCMobile was Crashed...



Is there some method to fix this problem? Thank you


在 2016年12月12日星期一 UTC+8下午8:13:58,Henrik Andreassson写道:
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
ARDVideoCallViewController.m

Henrik Andreasson

unread,
Dec 30, 2016, 6:32:34 AM12/30/16
to discuss-webrtc
For issues that can be reproduced in AppRTCMobile, please file a bug report.
Add as many details as possible, device, OS version, crash logs etc.

Removing/adding a wired headset works for me (and has worked for a long time)
in the latest WebRTC revision. 

Regarding the changes in ARDVideoCallViewController, it is difficult to comment without understanding what you want to accomplish.  Try to upload a CL showing the changes you have done and explain the goal of your changes.

To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/118c965f-d460-4cc6-9c10-5d06beea73d0%40googlegroups.com.

何知翰

unread,
Dec 30, 2016, 6:46:29 AM12/30/16
to discuss-webrtc
I've send a bug report.
I'm only add a webview.nothing change..

在 2016年12月30日星期五 UTC+8下午7:32:34,Henrik Andreassson写道:

Tuan-Ngoc Le

unread,
May 17, 2017, 2:38:00 AM5/17/17
to discuss-webrtc
Hi, 

I'm facing the same problem. Any update on this issue?

Thanks,

Hamst

unread,
May 18, 2017, 1:54:16 AM5/18/17
to discuss-webrtc
WebRTC uses AudioUnit to play data, it means that AVAudioSession was acquired in exclusive way and you're not able to mix sound from webview and webrtc at the same time. You can look at http://stackoverflow.com/questions/13472406/play-sound-file-together-with-audiounit to try to play sound during webrtc call.

понедельник, 12 декабря 2016 г., 14:18:52 UTC+3 пользователь 何知翰 написал:

Tuan-Ngoc Le

unread,
May 18, 2017, 10:38:09 AM5/18/17
to discuss-webrtc
Thank you very much for your reply, @Hamst.
It means it's impossible to have video/audio stream while opening a web view which contains a sound. We actually don't want to play any sound on our web view however we are using a canvas in the web app. That canvas doesn't play any sound, but somehow it still affects to WebRTC streaming.

Regards
Reply all
Reply to author
Forward
0 new messages