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

Any plans for "seek" function or a "progress" listener? #5

Closed
brettpappas opened this issue Aug 2, 2016 · 13 comments
Closed

Any plans for "seek" function or a "progress" listener? #5

brettpappas opened this issue Aug 2, 2016 · 13 comments

Comments

@brettpappas
Copy link
Collaborator

I have used other platforms (Titanium) for playing audio in an app and one critical feature that I am not able to do with this module is to allow someone to "seek" to a certain spot of the audio file. I have done this from a UI standpoint using a scrubber since I knew the length of the audio (number of seconds).

I was also able to display the status of how far along the audio was using a event listener that returned the current progress.

Are these type of features planned?

@tlenclos
Copy link
Owner

tlenclos commented Aug 2, 2016

I did not plan any of these features since my usage is just to play a stream of a webradio, so you can't really seek into it.

But this could really be a nice addition, I'll pin this as enhancement and tell me if you plan to work on it. Otherwise I'll see this at the end of the week.

@brettpappas
Copy link
Collaborator Author

It looks like StreamingKit has options for getting the current time (progress) as well as a seekToTime method so I can take a stab at adding this when I have time later this week.

I am not as familiar with the way things work on the Android side so depending on how much success I have on the iOS side I might need help with Android to maintain feature parity.

@tlenclos
Copy link
Owner

tlenclos commented Aug 2, 2016

This is using the AAC decoder library (which is quite old) and it doesn't seem to support seek features 😞 . Maybe we should find a better library (the tricky part is handling icy metadata).

@brettpappas
Copy link
Collaborator Author

I just created PR's for both features in iOS. Maybe we can leave it as undocumented features until a solution is found for Android. I can look and see what was used for the project I did using Titanium.

@brettpappas
Copy link
Collaborator Author

Do you think we could use ExoPlayer for the Android side? It seems to support everything we need.

I found a React Native project that uses it already to get some ideas on how to integrate ExoPlayer called react-native-player.

@tlenclos
Copy link
Owner

tlenclos commented Aug 4, 2016

This really seems better than the old aacplayer we are currently using.

I'm not sure for the shoutcast support though but these guys seems to have implemented it successfully: google/ExoPlayer#389.

I'll look into it tomorrow, good call.

@donedgardo
Copy link
Contributor

donedgardo commented Aug 8, 2016

I'll leave this libarary here, its a react native native module for ios networking and does have seek to time feature: it might help. https://github.com/pwbrown/react-native-ios-network-audio

@brettpappas
Copy link
Collaborator Author

I am closing this issue since seek functions have been added for iOS and we have another issue opened to address Android
#12

@alexandergunnarson
Copy link

This PR is great! Super useful for me. Question though: when will there be a new/updated release for this library now that this PR has been accepted @tlenclos?

@tlenclos
Copy link
Owner

tlenclos commented Sep 6, 2016

I wanted feature parity before releasing a new version but I guess we could publish a minor 👍

@alexandergunnarson
Copy link

Awesome, thanks @tlenclos !

@yehancha
Copy link

Any code sample on how to get the progress?

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

No branches or pull requests

5 participants