1

PhoneGap's VideoCaptureOptions accepts a duration parameter but it's currently not supported :s

We'd really like to build out app as an HTML5/CSS3/Javascript app, but this one feature is a show-stopper. Any help would be greatly appreciated!!

SomethingOn
  • 9,813
  • 17
  • 68
  • 107
  • Could you not just write a timer that automatically calls stop on the recording after a certain amount of time? – borrrden Aug 07 '12 at 01:21
  • ...that's a good point, but I'm not 100% sure. With PhoneGap it gets a handle to the file that's being generated and beyond that I don't think you have any control over the recording :( Correct me if I'm wrong though. – SomethingOn Aug 07 '12 at 01:24
  • I see in the docs two methods -> media.startRecord and media.stopRecord so what's the difference if you call it with a button and if you call it with a timer? – borrrden Aug 07 '12 at 01:26
  • You had my hopes up but it looks like that's for audio...why it's not for video as well is beyond me :s http://docs.phonegap.com/en/1.0.0/phonegap_media_media.md.html#media.startRecord – SomethingOn Aug 07 '12 at 01:31
  • Hmmmm...calling MediaFile.getFormatData() would give me the duration of the file and I could simply reject it if its too long... – SomethingOn Aug 07 '12 at 01:37
  • Oh gosh, what a badly named class...."Media" is only for Audio?! I see the docs say that "You cannot limit the length of a recording programatically" though so I think you are out of luck. – borrrden Aug 07 '12 at 01:41
  • I answered this question http://stackoverflow.com/questions/10213234/phonegap-cordova-ios-capture-video-with-a-duration-limit-ie-30-seconds/11838244#11838244 with a possible solution. Can't limit the duration programmatically, BUT can check the duration before uploading to the server ;) – SomethingOn Aug 07 '12 at 01:50

0 Answers0