-
- All Implemented Interfaces:
-
io.getstream.video.android.compose.ui.StreamCallActivityComposeUi,io.getstream.video.android.ui.common.StreamActivityUiDelegate
public class StreamCallActivityComposeDelegate implements StreamCallActivityComposeUi
A default implementation of the compose delegate for the call activity. Can be extended. Provides functions with the context of the activity.
Override the methods of this delegate to replace whole screens (e.g. the video call or the ringing screens). To customize individual components inside those screens, override componentFactory instead; the screens rendered by this delegate resolve their components through that factory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classStreamCallActivityComposeDelegate.Companion
-
Field Summary
Fields Modifier and Type Field Description private final VideoComponentFactorycomponentFactory
-
Constructor Summary
Constructors Constructor Description StreamCallActivityComposeDelegate()
-
Method Summary
Modifier and Type Method Description VideoComponentFactorygetComponentFactory()The VideoComponentFactory provided to the VideoTheme that wraps all the screens rendered by this delegate. UnitloadingContent(StreamCallActivity activity)Shows a progressbar until everything is set. UnitsetContent(StreamCallActivity activity, Call call)Create the delegate. UnitRootContent(StreamCallActivity $self, Call call)Root content of the UI. UnitHandleCallRejectionFromNotification(StreamCallActivity $self, Call call)UnitLoadingContent(StreamCallActivity $self, Call call)Content shown when there is data to be loaded. UnitAudioCallContent(StreamCallActivity $self, Call call)Content for in-call audio-only calls. UnitVideoCallContent(StreamCallActivity $self, Call call)Content for in-call for every other call that has video capabilities. UnitOutgoingCallContent(StreamCallActivity $self, Modifier modifier, Call call, Boolean isVideoType, Boolean isShowingHeader, Function1<ColumnScope, Unit> headerContent, Function3<ColumnScope, List<MemberState>, Dp, Unit> detailsContent, Function1<BoxScope, Unit> controlsContent, Function0<Unit> onBackPressed, Function1<CallAction, Unit> onCallAction)Content for outgoing call. UnitIncomingCallContent(StreamCallActivity $self, Modifier modifier, Call call, Boolean isVideoType, Boolean isShowingHeader, Function1<ColumnScope, Unit> headerContent, Function3<ColumnScope, List<MemberState>, Dp, Unit> detailsContent, Function1<BoxScope, Unit> controlsContent, Function0<Unit> onBackPressed, Function1<CallAction, Unit> onCallAction)Content for incoming call. UnitNoAnswerContent(StreamCallActivity $self, Call call)Content for when the call was not answered. UnitRejectedContent(StreamCallActivity $self, Call call)Call when the call was rejected. UnitCallFailedContent(StreamCallActivity $self, Call call, Exception exception)Content when the call has failed for whatever reason. UnitCallDisconnectedContent(StreamCallActivity $self, Call call)Content when the call has failed for whatever reason. UnitPermissionsRationaleContent(StreamCallActivity $self, Call call, List<String> granted, List<String> notGranted)Content shown when the required permissions are not granted and the call cannot happen. -
-
Method Detail
-
getComponentFactory
VideoComponentFactory getComponentFactory()
The VideoComponentFactory provided to the VideoTheme that wraps all the screens rendered by this delegate. Override to customize individual components on those screens.
-
loadingContent
@StreamCallActivityDelicateApi() Unit loadingContent(StreamCallActivity activity)
Shows a progressbar until everything is set.
-
setContent
Unit setContent(StreamCallActivity activity, Call call)
Create the delegate.
- Parameters:
activity- the activitycall- the call
-
RootContent
@StreamCallActivityDelicateApi()@Composable() Unit RootContent(StreamCallActivity $self, Call call)
Root content of the UI. If you override this, the rest might not work as expected and need to be called from this method.
- Parameters:
call- the call.
-
HandleCallRejectionFromNotification
@Composable() Unit HandleCallRejectionFromNotification(StreamCallActivity $self, Call call)
-
LoadingContent
@Composable() Unit LoadingContent(StreamCallActivity $self, Call call)
Content shown when there is data to be loaded.
- Parameters:
call- the call.
-
AudioCallContent
@Composable() Unit AudioCallContent(StreamCallActivity $self, Call call)
Content for in-call audio-only calls. Audio call is a call which returns
falsefor Call.hasCapability when the argument isSendVideo- Parameters:
call- the call.
-
VideoCallContent
@Composable() Unit VideoCallContent(StreamCallActivity $self, Call call)
Content for in-call for every other call that has video capabilities. Default call is a call which returns
truefor Call.hasCapability when the argument isSendVideo- Parameters:
call- the call.
-
OutgoingCallContent
@Composable() Unit OutgoingCallContent(StreamCallActivity $self, Modifier modifier, Call call, Boolean isVideoType, Boolean isShowingHeader, Function1<ColumnScope, Unit> headerContent, Function3<ColumnScope, List<MemberState>, Dp, Unit> detailsContent, Function1<BoxScope, Unit> controlsContent, Function0<Unit> onBackPressed, Function1<CallAction, Unit> onCallAction)
Content for outgoing call.
- Parameters:
modifier- the UI modifiercall- the call.isVideoType- if the call is video or notisShowingHeader- if the header will be shownheaderContent- the content of the headerdetailsContent- the details content (participant avatars etc..
-
IncomingCallContent
@Composable() Unit IncomingCallContent(StreamCallActivity $self, Modifier modifier, Call call, Boolean isVideoType, Boolean isShowingHeader, Function1<ColumnScope, Unit> headerContent, Function3<ColumnScope, List<MemberState>, Dp, Unit> detailsContent, Function1<BoxScope, Unit> controlsContent, Function0<Unit> onBackPressed, Function1<CallAction, Unit> onCallAction)
Content for incoming call.
- Parameters:
modifier- the modifiercall- the call.
-
NoAnswerContent
@Composable() Unit NoAnswerContent(StreamCallActivity $self, Call call)
Content for when the call was not answered.
- Parameters:
call- the call.
-
RejectedContent
@Composable() Unit RejectedContent(StreamCallActivity $self, Call call)
Call when the call was rejected.
- Parameters:
call- the call.
-
CallFailedContent
@Composable() Unit CallFailedContent(StreamCallActivity $self, Call call, Exception exception)
Content when the call has failed for whatever reason.
- Parameters:
call- the call
-
CallDisconnectedContent
@Composable() Unit CallDisconnectedContent(StreamCallActivity $self, Call call)
Content when the call has failed for whatever reason.
- Parameters:
call- the call
-
PermissionsRationaleContent
@Composable() Unit PermissionsRationaleContent(StreamCallActivity $self, Call call, List<String> granted, List<String> notGranted)
Content shown when the required permissions are not granted and the call cannot happen. Note: There are other places that permissions are required like in the service etc.. Best practice is to request these permissions a screen before starting the call.
-
-
-
-