hyochan / react-native-audio-recorder-player

react-native native module for audio recorder and player.
MIT License
681 stars 203 forks source link

Add isFinished to rn-playback event #609

Closed jbaudanza closed 4 weeks ago

jbaudanza commented 1 month ago

The purpose of this PR is to support chunked transfer-encoded HTTP requests, such as those returned from OpenAI and ElevenLabs Text-to-speech APIs.

Since these http requests don't contain a content-length, we can't rely on the duration to determine when they have finished.

jbaudanza commented 4 weeks ago

How about changing variable name to hasChanged?

Sure, but can you explain the name a bit? I'm not sure what "changed" is referring to in this context. Does it mean the playback state has changed from playing to finished?

hyochan commented 4 weeks ago

How about changing variable name to hasChanged?

Sure, but can you explain the name a bit? I'm not sure what "changed" is referring to in this context. Does it mean the playback state has changed from playing to finished?

Oh I am so sorry. I meant hasFinished. I thought has is better choice in this case. However, I justed asked chatgpt and found that isFinished is better here.

Screenshot 2024-06-09 at 8 39 57 PM

Let me merge this!