Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ipavlidakis committed Oct 4, 2023
1 parent 49dce2a commit cb4009a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 14 deletions.
1 change: 0 additions & 1 deletion Sources/StreamVideoSwiftUI/ViewFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public protocol ViewFactory: AnyObject {
/// - Parameters:
/// - viewModel: The view model used for the call.
/// - availableSize: the size available for rendering.
/// - onViewRendering: called when the video view is rendered.
/// - onChangeTrackVisibility: called when a track changes its visibility.
/// - Returns: view shown in the video participants slot.
func makeVideoParticipantsView(
Expand Down
3 changes: 0 additions & 3 deletions docusaurus/docs/iOS/03-guides/10-view-slots.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ The video participants view slot presents the grid of users that are in the call
public func makeVideoParticipantsView(
participants: [CallParticipant],
availableSize: CGSize,
onViewRendering: @escaping (VideoRenderer, CallParticipant) -> Void,
onChangeTrackVisibility: @escaping @MainActor(CallParticipant, Bool) -> Void
) -> some View {
VideoParticipantsView(
participants: participants,
availableSize: availableSize,
onViewRendering: onViewRendering,
onChangeTrackVisibility: onChangeTrackVisibility
)
}
Expand All @@ -78,7 +76,6 @@ In the method, the following parameters are provided:

- `participants` - the list of participants.
- `availableSize` - the available size for the participants view.
- `onViewRendering` - called when the view is rendered. This callback should be used to attach a track to the view.
- `onChangeTrackVisibility` - callback when the track changes its visibility.

#### Video Participant View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,11 @@ The video participants view slot presents the grid of users that are in the call
public func makeVideoParticipantsView(
participants: [CallParticipant],
availableSize: CGSize,
onViewRendering: @escaping (VideoRenderer, CallParticipant) -> Void,
onChangeTrackVisibility: @escaping @MainActor(CallParticipant, Bool) -> Void
) -> some View {
VideoParticipantsView(
participants: participants,
availableSize: availableSize,
onViewRendering: onViewRendering,
onChangeTrackVisibility: onChangeTrackVisibility
)
}
Expand All @@ -60,7 +58,6 @@ In the method, the following parameters are provided:

- `participants` - the list of participants.
- `availableSize` - the available size for the participants view.
- `onViewRendering` - called when the view is rendered. This callback should be used to attach a track to the view.
- `onChangeTrackVisibility` - callback when the track changes its visibility.

#### Video Participant View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ VideoParticipantsView(
viewFactory: DefaultViewFactory.shared,
viewModel: viewModel,
availableSize: availableSize,
onViewRendering: onViewRendering,
onChangeTrackVisibility: onChangeTrackVisibility
)
```
Expand All @@ -33,7 +32,6 @@ The parameters needed for this component are as follows:
- `viewFactory` - the view factory used for creation of the views
- `viewModel` - the `CallViewModel`
- `availableSize` - the available size for the view
- `onViewRendering` - called when the view is rendered or updated
- `onChangeTrackVisibility` - called when the track changes its visibility

If you are using our `ViewFactory`, you can swap this component with your implementation by implementing the following method:
Expand All @@ -42,14 +40,12 @@ If you are using our `ViewFactory`, you can swap this component with your implem
public func makeVideoParticipantsView(
viewModel: CallViewModel,
availableSize: CGSize,
onViewRendering: @escaping (VideoRenderer, CallParticipant) -> Void,
onChangeTrackVisibility: @escaping @MainActor(CallParticipant, Bool) -> Void
) -> some View {
CustomVideoParticipantsView(
viewFactory: self,
viewModel: viewModel,
availableSize: availableSize,
onViewRendering: onViewRendering,
onChangeTrackVisibility: onChangeTrackVisibility
)
}
Expand All @@ -68,7 +64,6 @@ ParticipantsGridLayout(
pinnedParticipant: $viewModel.pinnedParticipant,
availableSize: availableSize,
orientation: orientation,
onViewRendering: onViewRendering,
onChangeTrackVisibility: onChangeTrackVisibility
)
```
Expand All @@ -84,7 +79,6 @@ ParticipantsSpotlightLayout(
participants: Array(viewModel.participants.dropFirst()),
size: availableSize,
pinnedParticipant: $viewModel.pinnedParticipant,
onViewRendering: onViewRendering,
onChangeTrackVisibility: onChangeTrackVisibility
)
```
Expand All @@ -99,7 +93,6 @@ ParticipantsFullScreenLayout(
participant: first,
size: availableSize,
pinnedParticipant: $viewModel.pinnedParticipant,
onViewRendering: onViewRendering,
onChangeTrackVisibility: onChangeTrackVisibility
)
```

0 comments on commit cb4009a

Please sign in to comment.