How to add repeat option in using exo player?

I want to create an app in which user will select the time and the exo player will continue to play the same music for that time.
For example: If user selects 10 minutes from the list view option for the music A, then the exo player will continue to play music A for 10 minutes continuously.
Will anyone help me please?
Thanks.

Use the clock component which checks current time and use date picker to set the duration… Use clock component to check whether the time is over or not if over then stop exoplayer