R
R
rafaelSalihov2020-01-12 22:57:21
Java
rafaelSalihov, 2020-01-12 22:57:21

How to stop MediaPlayer from playing when a certain second is reached?

I have such a task, I need to play one mp3 file when pressing different buttons, only each button has different start of playback, for example, button 1 should be played from 53 seconds mp3 file, this is done using mediaPlayer.getCurrentPosition() - 53000 , and how can I stop when reaching mp3 56 seconds for example?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Zaletsky, 2020-01-13
@JZ_52

Well, check, when you reach a certain goal, stop. Didn't I understand correctly?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question