-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Feature | Support onBytesWrittenVideo to receive bytes on JS while recording Video #3549
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
cool! |
| DispatchQueue.main.async { | ||
| onBytesWritten(bytes) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have to run on the main queue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't needed, I removed the execution on the main queue
|
@frodriguez-hu is attempting to deploy a commit to the mrousavy's Team Team on Vercel. A member of the Team first needs to authorize it. |
What
This PR Adds the
onBytesWrittenVideocallback in order to receive the bytes of the video while it is being recorded.Changes
IOS
DispatchSourceTimeron Ios in order to read the file size from the FileSystem every 400 ms, that will be executed after the video has started and when finished the timer is cleaned.onBytesWrittenVideoEventasRCTDirectEventBlockin order to send events to JS inRCTViewManagerAndroid
onBytesWrittenVideoon thegetExportedCustomDirectEventTypeConstantsand all the logic to treat that as an Event and send data to JSVideoRecordEvent.Statusas it is available thereTSX/TS
NativeEventto just expose(bytes: number) => voidDocs
Tested on
Related issues