fun Context.getVideoDuration(videoId: String): Long
get Duration of Video from MediaStore.Video with given videoId
you can get videoId from Context.getVideoFileId()
context - Context object
context
videoId - Video ID
videoId