iOS Custom Audio(Data) Source

284 views
Skip to first unread message

Orgest Blakçori

unread,
Feb 5, 2024, 10:32:12 AM2/5/24
to discuss-webrtc
Hi,

In our iOS app, we have integrated a stethoscope iot device, that returns continuous audio data. I'm trying to get add those data on audio track of webrtc instead of my mic.

I do not see any documentation related to that. I am aware that i have to modify native code but some starting point would be really helpful.

Maxim Komlev

unread,
Feb 5, 2024, 11:17:06 PM2/5/24
to discuss...@googlegroups.com
Hi,

As an option, you could implement custom audio device (RTCAudioDeviceand override default one over RTCPeerConnectionFactory

RTCPeerConnectionFactory 

/* Initialize object with injectable video encoder/decoder factories and injectable ADM */

- (instancetype)

    initWithEncoderFactory:(nullable id<RTC_OBJC_TYPE(RTCVideoEncoderFactory)>)encoderFactory

            decoderFactory:(nullable id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)>)decoderFactory

               audioDevice:(nullable id<RTC_OBJC_TYPE(RTCAudioDevice)>)audioDevice; 

And use deliverRecordedData to feed outgoing audio track with your data.

Also be sure you have set "send" audio over SDP offer with corresponding audio options.

Best Regards, Maxim.



пн, 5 февр. 2024 г. в 07:32, Orgest Blakçori <orgest....@gmail.com>:
Hi,

In our iOS app, we have integrated a stethoscope iot device, that returns continuous audio data. I'm trying to get add those data on audio track of webrtc instead of my mic.

I do not see any documentation related to that. I am aware that i have to modify native code but some starting point would be really helpful.

--
This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
---
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-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/ee62019c-e546-41a5-8382-58e561527efen%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages