最大持续时间捕捉视频的android [英] Max duration for capture video on android

查看:255
本文介绍了最大持续时间捕捉视频的android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有code捕捉在Android上的视频剪辑:

I have code for capturing a video clip on Android:

Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.putExtra("android.intent.extra.durationLimit", 30000);
intent.putExtra("EXTRA_VIDEO_QUALITY", 0);
startActivityForResult(intent, ActivityRequests.REQUEST_TAKE_VIDEO);

这code行之有效的API 2.2,但持续时间限制不会对API 2.1(银河S)工作。有一些常量或参数设置这个时候,还是有比我正在采取一个更好的方法?

This code works well on API 2.2, but the duration limit does not work on API 2.1 (Galaxy S). Is there some constant or parameter for setting this time, or is there a better approach than the one I am taking?

我问,因为我发现的Galaxy S上使用的其他应用程序(称为活力),它可以录制视频了很短的时间量。

I ask because I found another application that works on the Galaxy S (called Vibrant) which can record video for a short amount of time.

推荐答案

android.intent.extra.durationLimit 被引入API 8级,所以它不具备的巧克力慕斯蛋糕和更早的版本,很遗憾。一些设备制造商可能有一个专有的方法来设置最大持续时间上较旧的设备,这解释了为什么你已经看到了这方面的工作在某些pre-Froyo的应用程序。

android.intent.extra.durationLimit was introduced in API Level 8, so it's not available in Eclair and earlier, unfortunately. Some device manufacturers may have a proprietary way to set the maximum duration on older devices, which explain why you have seen this working on some pre-Froyo applications.

这篇关于最大持续时间捕捉视频的android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆