[jitsi-dev] Playing a WAV file during call - If possible, mix with audio

Hi All,

I am customizing Jitsi to play a Wav file when a call is in progress.

I am facing trouble doing it, and would appreciate if you can help me out.



I can switch the data source before the call starts, by using a custom
AudioFileMediaDevice and switching it on in CallPeerMediaHandler.

But I am having problems in replacing the datasource when the call is in


I've tried the following but couldn't make it work.

1) I tried getting the device's output datasource and added a URLDatasource
of the wav file using addInDataSource method. Didn't work.

* DataSource dataSource = device.createOutputDataSource();*

* DataSource fileDataSource = Manager.createDataSource(new

2) I tried adding a custom Capture device and switch it, but its not
working too:

*CaptureDeviceInfo2 fileDevice =*
* new CaptureDeviceInfo2("Recorded Audio 1",*
* fileDataSource.getLocator(), null, null, null, null);*

* ((MediaServiceImpl) LibJitsi.getMediaService())*
fileDevice, false);*

This is working for playback though, not as a capture device.


I am new to libjitsi, so I'm having tough time trying to decode what is
Any directions on how to resolve this would be great.