Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ipavlidakis committed Jan 25, 2024
1 parent 2f25a41 commit 4a3c616
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ The `OutgoingCallView` lets you easily build UI when you're calling or ringing o

## Usage

In order to create the `OutgoingCallView`, you need to instantiate it with the `outgoingCallMembers` and the `callControls`.
In order to create the `OutgoingCallView`, you need to instantiate it with the `outgoingCallMembers`, `callTopView` and the `callControls`.

```swift
public var body: some View {
OutgoingCallView(
outgoingCallMembers: outgoingCallMembers,
callTopView: callTopView,
callControls: callControls
)
}
```

The `callControls` parameter is a SwiftUI view that is showing the actions you can do during a call.
The `callTopView` and `callControls` parameter is a SwiftUI view that is showing the actions you can do during a call.

If you are using our `CallContainer` to add calling support to your views, this view is automatically shown when the `callingState` in the `CallViewModel` is `.outgoing`.

Expand All @@ -24,7 +25,7 @@ If you want to customize (or completely replace) the `OutgoingCallView`, you sho
```swift
public func makeOutgoingCallView(viewModel: CallViewModel) -> some View {
CustomOutgoingCallView(viewModel: viewModel)
}
}
```

## Sounds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@ Let's see how to use the component.
If you want to use the componant as a standalone, you can create it like this:

```swift
let view = CallParticipantsInfoView(callViewModel: viewModel, availableFrame: availableFrame)
let view = CallParticipantsInfoView(callViewModel: viewModel)
```

The required parameters for this method are:
- `callViewModel` - the call view model used for the call.
- `availableFrame` - the available frame for the view.

Additionally, if you are using our `ViewFactory` and the default view, you can customize or swap this view with your own implementation. In order to do that, you should implement the method `makeParticipantsListView`:

```swift
func makeParticipantsListView(
viewModel: CallViewModel,
availableFrame: CGRect
viewModel: CallViewModel
) -> some View {
CustomCallParticipantsInfoView(
callViewModel: viewModel,
availableFrame: availableFrame
callViewModel: viewModel,
)
```

Expand Down

0 comments on commit 4a3c616

Please sign in to comment.