Skip to content

Commit

Permalink
Create a new controls UI layer for the DamusVideoPlayer, providing pl…
Browse files Browse the repository at this point in the history
…ay/pause, volume control, content scale, playback rate controls, as well as a seek/timecode bar.

Closes: #1537
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
kroucis authored and jb55 committed Sep 5, 2023
1 parent 3402cac commit 07522b1
Show file tree
Hide file tree
Showing 4 changed files with 441 additions and 79 deletions.
2 changes: 1 addition & 1 deletion damus/Components/ImageCarousel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ struct ImageCarousel: View {
open_sheet = true
}
case .video(let url):
DamusVideoPlayer(url: url, model: video_model(url), video_size: $video_size)
DamusVideoPlayer(url: url, model: video_model(url), video_size: $video_size, showControls: false)
.onChange(of: video_size) { size in
guard let size else { return }

Expand Down
2 changes: 1 addition & 1 deletion damus/Views/Images/ImageContainerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct ImageContainerView: View {
case .image(let url):
Img(url: url)
case .video(let url):
DamusVideoPlayer(url: url, model: cache.get_video_player_model(url: url), video_size: .constant(nil))
DamusVideoPlayer(url: url, model: cache.get_video_player_model(url: url), video_size: .constant(nil), showControls: true)
}
}
}
Expand Down
Loading

0 comments on commit 07522b1

Please sign in to comment.