diff --git a/MVMCoreUI/Behaviors/PlayAudioBehavior.swift b/MVMCoreUI/Behaviors/PlayAudioBehavior.swift index 12a98022..ebb9f46c 100644 --- a/MVMCoreUI/Behaviors/PlayAudioBehavior.swift +++ b/MVMCoreUI/Behaviors/PlayAudioBehavior.swift @@ -24,7 +24,8 @@ public class PagePlayAudioBehaviorModel: PageBehaviorModelProtocol { public init() { } } -public class PagePlayAudioBehavior: PageCustomActionHandlerBehavior { +public class PagePlayAudioBehavior: PageCustomActionHandlerBehavior, PageVisibilityBehavior { + //-------------------------------------------------- // MARK: - Active Model //-------------------------------------------------- @@ -63,6 +64,12 @@ public class PagePlayAudioBehavior: PageCustomActionHandlerBehavior { return true } + //-------------------------------------------------- + // MARK: - PageVisibilityBehavior + //-------------------------------------------------- + + public func onPageShown(_ delegateObject: MVMCoreUIDelegateObject?) { } + public func onPageHidden(_ delegateObject: MVMCoreUIDelegateObject?) { //Stop player Self.activeAudioPlayerDelegate?.pause()