question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Video Duration Limit option not working

See original GitHub issue

I’m setting the durationLimit upload to be at 5 seconds but the picker allows videos that are greater than 5 seconds like 30 seconds.

Is this a bug? What is the expected behavior when a durationLimit is set and a user tries to upload a video greater? Is there supposed to be a warning, etc?

const options = {
      mediaType: 'video',
      videoQuality: 'medium',
      durationLimit: 5,
    }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:9

github_iconTop GitHub Comments

5reactions
tsugittacommented, Apr 11, 2017

I think the issue occurred because the ImagePicker’s option allowsEditing must be true to trim a video.

const options = {
  mediaType: 'video',
  videoQuality: 'medium',
  durationLimit: 5,
  allowsEditing: true
}
4reactions
larryranchescommented, Mar 31, 2017

Seems like this works for when capturing a video and setting a duration limit. I guess the durationLimit option doesn’t handle when uploading an existing video from a mobile device that is greater than the durationLimit.

Would this be feature request?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Video Duration Limit option not working · Issue #534 - GitHub
I'm setting the durationLimit upload to be at 5 seconds but the picker allows videos that are greater than 5 seconds like 30...
Read more >
Setting the video duration limit not working - Treehouse
Another not-great workaround is to message the user to record less than 10 seconds and then check the file size once the video...
Read more >
Upload videos longer than 15 minutes - Android - YouTube Help
Increase your video length limit · Open the YouTube mobile app. · Tap Create addition sign and then · Select a video longer...
Read more >
video Duration Limit is not working in iOS 14 and image ...
durationLimit only works for videos taken from camera. For video Duration Limit in iOS ImagePicker.launchCamera( { mediaType: 'video' ...
Read more >
Enabling Longer Videos In YouTube
Enabling Longer Videos In YouTube · Click Increase your limit link at the bottom of the page. Click "Increase your limit." · Follow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found