Merge branch 'td/ringtone' into 'main'
fix: play ringtone for incoming calls before trying to getUserMedia Closes famedly-web#656 See merge request famedly/company/frontend/famedlysdk!1204
This commit is contained in:
commit
4ff07b58f4
|
|
@ -229,6 +229,17 @@ class VoIP {
|
||||||
content['offer']['type'],
|
content['offer']['type'],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/// play ringtone. We decided to play the ringtone before adding the call to
|
||||||
|
/// the incoming call stream because getUserMedia from initWithInvite fails
|
||||||
|
/// on firefox unless the tab is in focus. We should atleast be able to notify
|
||||||
|
/// the user about an incoming call
|
||||||
|
///
|
||||||
|
/// Autoplay on firefox still needs interaction, without which all notifications
|
||||||
|
/// could be blocked.
|
||||||
|
if (confId == null) {
|
||||||
|
delegate.playRingtone();
|
||||||
|
}
|
||||||
|
|
||||||
await newCall.initWithInvite(
|
await newCall.initWithInvite(
|
||||||
callType, offer, sdpStreamMetadata, lifetime, confId != null);
|
callType, offer, sdpStreamMetadata, lifetime, confId != null);
|
||||||
|
|
||||||
|
|
@ -247,10 +258,6 @@ class VoIP {
|
||||||
|
|
||||||
///TODO: notify the callkeep that the call is incoming.
|
///TODO: notify the callkeep that the call is incoming.
|
||||||
}
|
}
|
||||||
// Play ringtone
|
|
||||||
if (confId == null) {
|
|
||||||
delegate.playRingtone();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> onCallAnswer(
|
Future<void> onCallAnswer(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue