Skip to content

Commit

Permalink
SwiftUIVideoView が表示される前に videoStop method を実行する
Browse files Browse the repository at this point in the history
  • Loading branch information
zztkm committed Oct 4, 2024
1 parent 15947d0 commit d317bb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sora/SwiftUIVideoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public struct SwiftUIVideoView<Background>: View where Background: View {
RepresentedVideoView(controller)
.opacity(controller.isCleared ? 0 : 1)
}
.onAppear {
videoStop(stopVideo)
}
.onChange(of: stopVideo) { newValue in
videoStop(newValue)
}
Expand Down

0 comments on commit d317bb5

Please sign in to comment.