Confirming to Visibility behavior

This commit is contained in:
Sumanth Nadigadda 2021-07-13 00:20:02 +05:30
parent 4d46d56f8e
commit f434ba3e8d

View File

@ -24,7 +24,8 @@ public class PagePlayAudioBehaviorModel: PageBehaviorModelProtocol {
public init() { } public init() { }
} }
public class PagePlayAudioBehavior: PageCustomActionHandlerBehavior { public class PagePlayAudioBehavior: PageCustomActionHandlerBehavior, PageVisibilityBehavior {
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Active Model // MARK: - Active Model
//-------------------------------------------------- //--------------------------------------------------
@ -63,6 +64,12 @@ public class PagePlayAudioBehavior: PageCustomActionHandlerBehavior {
return true return true
} }
//--------------------------------------------------
// MARK: - PageVisibilityBehavior
//--------------------------------------------------
public func onPageShown(_ delegateObject: MVMCoreUIDelegateObject?) { }
public func onPageHidden(_ delegateObject: MVMCoreUIDelegateObject?) { public func onPageHidden(_ delegateObject: MVMCoreUIDelegateObject?) {
//Stop player //Stop player
Self.activeAudioPlayerDelegate?.pause() Self.activeAudioPlayerDelegate?.pause()