-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Any plans for "seek" function or a "progress" listener? #5
Comments
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. |
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. |
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). |
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. |
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. |
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. |
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 |
I am closing this issue since seek functions have been added for iOS and we have another issue opened to address Android |
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? |
I wanted feature parity before releasing a new version but I guess we could publish a minor 👍 |
Awesome, thanks @tlenclos ! |
Any code sample on how to get the progress? |
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?
The text was updated successfully, but these errors were encountered: