From d317bb508687c17f70da3a9353fe69cb9bead201 Mon Sep 17 00:00:00 2001 From: zztkm Date: Fri, 4 Oct 2024 12:03:43 +0900 Subject: [PATCH] =?UTF-8?q?SwiftUIVideoView=20=E3=81=8C=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=82=8B=E5=89=8D=E3=81=AB=20videoStop=20met?= =?UTF-8?q?hod=20=E3=82=92=E5=AE=9F=E8=A1=8C=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sora/SwiftUIVideoView.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sora/SwiftUIVideoView.swift b/Sora/SwiftUIVideoView.swift index 244f562e..a92d2747 100644 --- a/Sora/SwiftUIVideoView.swift +++ b/Sora/SwiftUIVideoView.swift @@ -46,6 +46,9 @@ public struct SwiftUIVideoView: View where Background: View { RepresentedVideoView(controller) .opacity(controller.isCleared ? 0 : 1) } + .onAppear { + videoStop(stopVideo) + } .onChange(of: stopVideo) { newValue in videoStop(newValue) }