I configure Jitsi to play a Wav file when making a call.
I ran into difficulties in this, and would appreciate it if you could help me.
I can switch the data source before starting the call using the custom AudioFileMediaDevice and including it in the CallPeerMediaHandler.
But I am having problems replacing the data source when making a call.
==================================================== ============
I tried the following, but could not get it to work.
1) I tried to get the source data source of the device and added the source URL of the wav file using the addInDataSource method. Does not work.
DataSource dataSource = device.createOutputDataSource(); DataSource fileDataSource = Manager.createDataSource(new URL("file://resources/sounds/Sample.wav")); ((AudioMixingPushBufferDataSource)dataSource).addInDataSource(fileDataSource);
2) I tried adding a custom Capture device and switching it, but it doesnβt work either:
CaptureDeviceInfo2 fileDevice = new CaptureDeviceInfo2("Recorded Audio 1", fileDataSource.getLocator(), null, null, null, null); ((MediaServiceImpl) LibJitsi.getMediaService()) .getDeviceConfiguration().getAudioSystem().setDevice(AudioSystem.DataFlow.CAPTURE, fileDevice, false);
This works for playback, but not as a capture device.
3) I even tried to add a new audio system with a playback device as a file data source, but this also does not work.
==================================================== ============
I am new to libjitsi, so I have a hard time trying to decipher what is happening. Any directions on how to resolve this would be great.
java file device audio jitsi
Paramesh
source share