-
Notifications
You must be signed in to change notification settings - Fork 20
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
Play twice #5
Comments
Hi Diego, are you sure you don't click twice on the button? More info will be appreciated |
Hi Hugo, Yes, I'm sure! You can check that in your sample app. Click play (any view) and before audio finishes, click again, it should stop and change icon to play. Instead of it, it is playing again. |
Looks like it plays again a couple of seconds and then stops. |
Sure! I'm checking it and I'm making some improvements (adding a seekbar). As soon as I get it done, I'll let you know! If you think it is ok, I'll make a pull request. |
Hugo, I have forked your repo and made some changes. Please take a look: https://github.com/diegolucasb/AudioPlayerView If you find it interesting we can make a pull request! By the way, the problema I said before (play twice) happened when you call mediaPlayer.seekTo(0) after call mediaPlayer.pause(); If you call pause after seekTo(0) works fine! Have no idea why!! |
Awesome work @diegolucasb 🥇 I will try to update the fix for the "play twice" soon. I checked your fork and there are a couple things that I would suggest. 1.- There is a long time since I don't work with seekbars. It seems good 👍 . 2.- Changing Stop to Pause makes the widget have a different behaviour as I planned. It is suppose to be used with small audios so pausing the audio has no sense. In any case if we want to add this feature it should be parameterised. So the user of the lib could choose of he want to have a pause or a stop. 3.- Why did you change the main icons? :) |
Thanks @HugoMatilla. Glad you like it! 1.- ok 2.- I'm using it with small audios as well, 10 sec average. I think pausing small audios has no sense if you don't have seekbar, loot at WhatsApp audio player, for example. That was my intention when I added a seekbar and changed stop feature to pause. I strongly agree with you though. I has to be parameterized, I gonna add this feature ASAP. 3.- I though them prettier. Sorry! hahah Thanks again! |
You are very welcome :) 2.-I think you can just change the stop to pause if there is a seekbar, so not need for an extra paramaeter. If there is a seekbar linked to the AudioPlayerView, the stop function changes to pause function. What do you think? 3.-Yes please. I think the original ones are less styled so they fit better in any UI. Keep it rolling 👍 |
2.- Sounds good! I'm gonna do it 3.- Ok, no problem! Gonna put it back! Thanks! |
When you click stop while audio is playing, it starts to play again!
The text was updated successfully, but these errors were encountered: