Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot play audio after reaching "ended" state #53

Closed
murad1981 opened this issue Apr 18, 2019 · 4 comments
Closed

cannot play audio after reaching "ended" state #53

murad1981 opened this issue Apr 18, 2019 · 4 comments

Comments

@murad1981
Copy link

murad1981 commented Apr 18, 2019

I cannot play the same audio file again after it ended with end reason: playedUntilEnd, is there a way to play it again ?

@jorgenhenrichsen
Copy link
Owner

Can you call player.load(item:)? Or do you mean a repeat function that will repeat a track when it is completed?

@murad1981
Copy link
Author

I don't mean a continuous playback, I just want to play it again with a second play button press.

@murad1981
Copy link
Author

Can you call player.load(item:)? Or do you mean a repeat function that will repeat a track when it is completed?

I can call player.load(item:) but it will reload the item again and there will be a delay, instead the player must play the same item from cache.

@jorgenhenrichsen
Copy link
Owner

Ah, I get it. Loading the item will probably result in a delay, as there is no caching system right now. This really ties into #39.

If you want to just replay the current item, you could maybe call seek(to: 0) when the item has played to the end? This way when calling play() again, it will start over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants