I am trying to stream audio over a call on Android.
@Override
public void callState(LinphoneCore linphoneCore, LinphoneCall linphoneCall, LinphoneCall.State state, String s) {
super.callState(linphoneCore, linphoneCall, state, s);
notifyStatus(s);
if (state == LinphoneCall.State.Connected) {
LinphoneCore core = LinphoneManagerx.getLc();
LinphonePlayer player = call.getPlayer();
String file = getExternalFilesDir(null).getAbsolutePath() + "/mpthreetest.mp3";
player.open(file, new LinphonePlayer.Listener() {
@Override
public void endOfFile(LinphonePlayer linphonePlayer) {
}
});
2) Directly use the multicast address:
@Override
public void callState(LinphoneCore linphoneCore, LinphoneCall linphoneCall, LinphoneCall.State state, String s) {
super.callState(linphoneCore, linphoneCall, state, s);
notifyStatus(s);
if (state == LinphoneCall.State.Connected) {
LinphoneCore core = LinphoneManagerx.getLc();
notifyStatus("Multicast address: " + core.getAudioMulticastAddr());
LinphonePlayer player = call.getPlayer();
try {
AudioStream stream = new AudioStream(InetAddress.getByName(core.getAudioMulticastAddr()));
}
catch (SocketException ex) {
ex.printStackTrace();
notifyError(ex.getMessage());
}
catch (UnknownHostException ex) {
ex.printStackTrace();
notifyError(ex.getMessage());
}
}
However in both cases I get:
Incompatible, check codecs or security settings...
I tried turning on the debug logs but it gave me no extra info. How can I achieve this?
Thanks,