mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-29 03:31:02 +00:00
More fixes to video
This commit is contained in:
parent
71d12aec15
commit
7a7066baa4
1 changed files with 14 additions and 0 deletions
|
@ -80,6 +80,10 @@ public struct MediaUIAttachmentVideoView: View {
|
|||
viewModel.pause()
|
||||
}
|
||||
.onTapGesture {
|
||||
if !preferences.autoPlayVideo && !viewModel.isPlaying {
|
||||
viewModel.play()
|
||||
return
|
||||
}
|
||||
isFullScreen = true
|
||||
}
|
||||
.fullScreenCover(isPresented: $isFullScreen) {
|
||||
|
@ -93,6 +97,16 @@ public struct MediaUIAttachmentVideoView: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
if isCompact || !preferences.autoPlayVideo {
|
||||
viewModel.play()
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
if isCompact || !preferences.autoPlayVideo {
|
||||
viewModel.pause()
|
||||
}
|
||||
}
|
||||
}
|
||||
.cornerRadius(4)
|
||||
.onChange(of: scenePhase) { _, newValue in
|
||||
|
|
Loading…
Reference in a new issue