Skip to content

Commit

Permalink
Add start/stop functionality
Browse files Browse the repository at this point in the history
This way audio will stop playing when the view is closed and the engine can start when the view is loaded
  • Loading branch information
emurray2 committed Jan 8, 2024
1 parent fcd9db4 commit 0f20fee
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ struct MultiSegmentPlayerView: View {
Spacer()
}
.navigationBarTitle(Text("Multi Segment Player"))
.onAppear {
conductor.start()
}
.onDisappear {
conductor.stop()
}
}

struct PlayPauseView: View {
Expand Down

0 comments on commit 0f20fee

Please sign in to comment.