-
Notifications
You must be signed in to change notification settings - Fork 374
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
Is there a way to play only a portion of an audio file (Seek. Play(duration in ms)). Feature Request. #246
Comments
I would like to have the same functionality. We currently require this to play segments of an audio file with accompanying text animation, essentially in a very similar way to karaoke. Our current workaround is using cuepoints:
I have found the support for seeking is very good on iOS as compared to android devices. |
It seems like there is no react-native library that currently supports this functionality from what I have seen |
Can't this be done with the seek functionality and stop? |
At the time of posting it could not be reliably achieved with seek and stop. However I have not tested since the intervalTimer inaccuracies were resolved. We have since scrapped this implementation due in part to vary varied performance between Android and iOS devices. |
I am sorry to hear that. I have used it in a Karoke type app that teaches
people to chant various Hindu (for now) prayers. It works quite well on
both platforms.
If you have time, you can check out the app called Chant With Me.
https://apps.apple.com/us/app/chant-with-me/id1548445902
https://play.google.com/store/apps/details?id=com.chantwithme
It still has only a few hundred users, but seems to be performing reliably.
I use seek and timers to stop the audio as required.
Thanks for building the library.
Cheers
Sanjay
…On Mon, Jun 21, 2021 at 4:43 PM rustygloves ***@***.***> wrote:
At the time of posting it could not be reliably achieved with seek and
stop. However I have not tested since the intervalTimer inaccuracies were
resolved. We have since scrapped this implementation due in part to vary
varied performance between Android and iOS devices.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#246 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGHU2LL3L2NRMJMD2RJ3D43TT4NEXANCNFSM4S5T37KQ>
.
--
Sanjay Dattatri,
|
Hi,
I am building an karaoke type of app. I have one large audio file with the entire song and the lyrics in english. I highlight one line at a time and play the corresponding audio once and then again (at lower volume) for the listener to sing along.
I have the 'start time' and 'duration' of audio corresponding to each line and use seek to start at the correct start time and setTimeout function to stop at the end of the duration. setTimeout however is not very accurate and so there are different periods of lag between devices (On some devices setTimeout seems to get called even before the given msecs, which is quite surprising. So much so, that I am even hesitant to state this!)
Is there a way by which I can play the audio file only for a specified duration? Current code is as follows:
Instead, I would like to use it as follows:
The text was updated successfully, but these errors were encountered: