jiti-meet/react/features/mobile/call-integration/reducer.js

17 lines
535 B
JavaScript
Raw Normal View History

2017-09-28 21:25:04 +00:00
import { assign, ReducerRegistry } from '../../base/redux';
android: add ConnectionService * feat(Android): implement ConnectionService Adds basic integration with Android's ConnectionService by implementing the outgoing call scenario. * ref(callkit): rename _SET_CALLKIT_SUBSCRIPTIONS * ref(callkit): move feature to call-integration directory * feat(ConnectionService): synchronize video state * ref(AudioMode): use ConnectionService on API >= 26 Not ready yet - few details left mentioned in the FIXMEs * feat(ConnectionService): add debug logs Adds logs to trace the calls. * fix(ConnectionService): leaking ConnectionImpl instances Turns out there is no callback fired back from the JavaScript side after the disconnect or abort event is sent from the native. The connection must be marked as disconnected and removed immediately. * feat(ConnectionService): handle onCreateOutgoingConnectionFailed * ref(ConnectionService): merge classes and move to the sdk package * feat(CallIntegration): show Alert if outgoing call fails * fix(ConnectionService): alternatively get call UUID from the account Some Android flavours (or versions ?) do copy over extras to the onCreateOutgoingConnectionFailed callback. But the call UUID is also set as the PhoneAccount's label, so eventually it should be available there. * ref(ConnectionService): use call UUID as PhoneAccount ID. The extra is not reliable on some custom Android flavours. It also makes sense to use unique id for the account instead of the URL given that it's created on the per call basis. * fix(ConnectionService): abort the call when hold is requested Turns out Android P can sometimes request HOLD even though there's no HOLD capability added to the connection (what!?), so just abort the call in that case. * fix(ConnectionService): unregister account on call failure Unregister the PhoneAccount onCreateOutgoingConnectionFailed. That's before the ConnectionImpl instance is created which is normally responsible for doing that. * fix(AudioModeModule): make package private and run on the audio thread * address other review comments
2019-01-31 16:20:54 +00:00
import { _SET_CALL_INTEGRATION_SUBSCRIPTIONS } from './actionTypes';
2017-09-28 21:25:04 +00:00
import CallKit from './CallKit';
android: add ConnectionService * feat(Android): implement ConnectionService Adds basic integration with Android's ConnectionService by implementing the outgoing call scenario. * ref(callkit): rename _SET_CALLKIT_SUBSCRIPTIONS * ref(callkit): move feature to call-integration directory * feat(ConnectionService): synchronize video state * ref(AudioMode): use ConnectionService on API >= 26 Not ready yet - few details left mentioned in the FIXMEs * feat(ConnectionService): add debug logs Adds logs to trace the calls. * fix(ConnectionService): leaking ConnectionImpl instances Turns out there is no callback fired back from the JavaScript side after the disconnect or abort event is sent from the native. The connection must be marked as disconnected and removed immediately. * feat(ConnectionService): handle onCreateOutgoingConnectionFailed * ref(ConnectionService): merge classes and move to the sdk package * feat(CallIntegration): show Alert if outgoing call fails * fix(ConnectionService): alternatively get call UUID from the account Some Android flavours (or versions ?) do copy over extras to the onCreateOutgoingConnectionFailed callback. But the call UUID is also set as the PhoneAccount's label, so eventually it should be available there. * ref(ConnectionService): use call UUID as PhoneAccount ID. The extra is not reliable on some custom Android flavours. It also makes sense to use unique id for the account instead of the URL given that it's created on the per call basis. * fix(ConnectionService): abort the call when hold is requested Turns out Android P can sometimes request HOLD even though there's no HOLD capability added to the connection (what!?), so just abort the call in that case. * fix(ConnectionService): unregister account on call failure Unregister the PhoneAccount onCreateOutgoingConnectionFailed. That's before the ConnectionImpl instance is created which is normally responsible for doing that. * fix(AudioModeModule): make package private and run on the audio thread * address other review comments
2019-01-31 16:20:54 +00:00
import ConnectionService from './ConnectionService';
android: add ConnectionService * feat(Android): implement ConnectionService Adds basic integration with Android's ConnectionService by implementing the outgoing call scenario. * ref(callkit): rename _SET_CALLKIT_SUBSCRIPTIONS * ref(callkit): move feature to call-integration directory * feat(ConnectionService): synchronize video state * ref(AudioMode): use ConnectionService on API >= 26 Not ready yet - few details left mentioned in the FIXMEs * feat(ConnectionService): add debug logs Adds logs to trace the calls. * fix(ConnectionService): leaking ConnectionImpl instances Turns out there is no callback fired back from the JavaScript side after the disconnect or abort event is sent from the native. The connection must be marked as disconnected and removed immediately. * feat(ConnectionService): handle onCreateOutgoingConnectionFailed * ref(ConnectionService): merge classes and move to the sdk package * feat(CallIntegration): show Alert if outgoing call fails * fix(ConnectionService): alternatively get call UUID from the account Some Android flavours (or versions ?) do copy over extras to the onCreateOutgoingConnectionFailed callback. But the call UUID is also set as the PhoneAccount's label, so eventually it should be available there. * ref(ConnectionService): use call UUID as PhoneAccount ID. The extra is not reliable on some custom Android flavours. It also makes sense to use unique id for the account instead of the URL given that it's created on the per call basis. * fix(ConnectionService): abort the call when hold is requested Turns out Android P can sometimes request HOLD even though there's no HOLD capability added to the connection (what!?), so just abort the call in that case. * fix(ConnectionService): unregister account on call failure Unregister the PhoneAccount onCreateOutgoingConnectionFailed. That's before the ConnectionImpl instance is created which is normally responsible for doing that. * fix(AudioModeModule): make package private and run on the audio thread * address other review comments
2019-01-31 16:20:54 +00:00
(CallKit || ConnectionService) && ReducerRegistry.register(
'features/call-integration',
2017-09-28 21:25:04 +00:00
(state = {}, action) => {
switch (action.type) {
android: add ConnectionService * feat(Android): implement ConnectionService Adds basic integration with Android's ConnectionService by implementing the outgoing call scenario. * ref(callkit): rename _SET_CALLKIT_SUBSCRIPTIONS * ref(callkit): move feature to call-integration directory * feat(ConnectionService): synchronize video state * ref(AudioMode): use ConnectionService on API >= 26 Not ready yet - few details left mentioned in the FIXMEs * feat(ConnectionService): add debug logs Adds logs to trace the calls. * fix(ConnectionService): leaking ConnectionImpl instances Turns out there is no callback fired back from the JavaScript side after the disconnect or abort event is sent from the native. The connection must be marked as disconnected and removed immediately. * feat(ConnectionService): handle onCreateOutgoingConnectionFailed * ref(ConnectionService): merge classes and move to the sdk package * feat(CallIntegration): show Alert if outgoing call fails * fix(ConnectionService): alternatively get call UUID from the account Some Android flavours (or versions ?) do copy over extras to the onCreateOutgoingConnectionFailed callback. But the call UUID is also set as the PhoneAccount's label, so eventually it should be available there. * ref(ConnectionService): use call UUID as PhoneAccount ID. The extra is not reliable on some custom Android flavours. It also makes sense to use unique id for the account instead of the URL given that it's created on the per call basis. * fix(ConnectionService): abort the call when hold is requested Turns out Android P can sometimes request HOLD even though there's no HOLD capability added to the connection (what!?), so just abort the call in that case. * fix(ConnectionService): unregister account on call failure Unregister the PhoneAccount onCreateOutgoingConnectionFailed. That's before the ConnectionImpl instance is created which is normally responsible for doing that. * fix(AudioModeModule): make package private and run on the audio thread * address other review comments
2019-01-31 16:20:54 +00:00
case _SET_CALL_INTEGRATION_SUBSCRIPTIONS:
2017-09-28 21:25:04 +00:00
return assign(state, 'subscriptions', action.subscriptions);
}
2017-09-28 21:25:04 +00:00
return state;
});