mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-10 08:20:42 +01:00
More fixes to video
This commit is contained in:
parent
71d12aec15
commit
7a7066baa4
@ -80,6 +80,10 @@ public struct MediaUIAttachmentVideoView: View {
|
|||||||
viewModel.pause()
|
viewModel.pause()
|
||||||
}
|
}
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
|
if !preferences.autoPlayVideo && !viewModel.isPlaying {
|
||||||
|
viewModel.play()
|
||||||
|
return
|
||||||
|
}
|
||||||
isFullScreen = true
|
isFullScreen = true
|
||||||
}
|
}
|
||||||
.fullScreenCover(isPresented: $isFullScreen) {
|
.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)
|
.cornerRadius(4)
|
||||||
.onChange(of: scenePhase) { _, newValue in
|
.onChange(of: scenePhase) { _, newValue in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user