Code: Select all
struct ContentView: View {
let player = Player()
var body: some View {
VStack {
Button(action: {
player.audioPlayer.stop()
player.audioPlayer.seek(time: 3)
player.audioPlayer.start()
}) {
Text("Seek to 3 seconds")
}
}
.padding()
}
}
Code: Select all
struct ContentView: View {
let player = Player()
var body: some View {
VStack {
Button(action: {
player.audioPlayer.stop()
player.audioPlayer.seek(time: 3)
player.audioPlayer.start()
}) {
Text("Seek to 3 seconds")
}
}
.padding()
}
}