Confirming to Visibility behavior
This commit is contained in:
parent
4d46d56f8e
commit
f434ba3e8d
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user