Im investigating the use of android.media.MediaRecorder
in my current Android application.
I've based my application on this Google Samples project
I can record video & audio using this sample project as a base
However I cannot see how I can associate text notes to the video.
My use case consists of "bookmarking" the video and adding a brief note at a particular point in time while still recording the Video & Audio.
I want to allow the user to be able to add multiple text notes at any point in the video as its being recorded.
MediaRecorder doesnt appear to have any methods that expose current elapsed recording time, will I have to keep my own timer and sync it to start, pause resume of my video recording?
Is theer another video recording library I can employ that will support my use case?
it appears that your MediaRecorder has a getMetrics
method:
https://developer.android.com/reference/android/media/MediaRecorder#getMetrics()
This bundle has a bunch of values listed here:
https://developer.android.com/reference/android/media/MediaRecorder.MetricsConstants
I think that you want this one:
https://developer.android.com/reference/android/media/MediaRecorder.MetricsConstants#VIDEO_TIMESCALE
example in Kotlin for getting the elapsed recorded time on a new MediaRecorder instance:
MediaRecorder().metrics.getInt(MediaRecorder.MetricsConstants.VIDEO_TIMESCALE)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.