为什么即使使用VidemaxDuration:30,

发布于 2025-02-12 23:16:48 字数 669 浏览 2 评论 0原文

在iOS中,我们无法上传任何大于30秒的视频。 而且,如果您尝试上传,它将为您提供一个将其修整为WhatsApp(例如WhatsApp)的选择,但是在Android上,它正在采用我们上传的任何视频。

任何想法可能导致这种行为以及如何解决这一行为。 提前致谢。

const _pickDocument = async () => {
let permissions = await ImagePicker.requestMediaLibraryPermissionsAsync();

if (permissions.granted === false) {
  alert("Permission is required. Please enable it from settings.");
  return;
}
let result = await ImagePicker.launchImageLibraryAsync({
  mediaTypes: ImagePicker.MediaTypeOptions.All,
  allowsEditing: true,
  quality: 1,
  videoMaxDuration: 30,
  
  
});

if (result.cancelled === true) return;
setSelectedImage((prev) => [...prev, result]);
};

in IOS, we can't upload any video that is greater than 30 Seconds.
and if you try to upload it would give you an option to trim it to 30 seconds like Whatsapp, but on android it is taking any video that we are uploading.

Any idea what might be causing this behaviour and how to resolve this.
Thanks in Advance.

const _pickDocument = async () => {
let permissions = await ImagePicker.requestMediaLibraryPermissionsAsync();

if (permissions.granted === false) {
  alert("Permission is required. Please enable it from settings.");
  return;
}
let result = await ImagePicker.launchImageLibraryAsync({
  mediaTypes: ImagePicker.MediaTypeOptions.All,
  allowsEditing: true,
  quality: 1,
  videoMaxDuration: 30,
  
  
});

if (result.cancelled === true) return;
setSelectedImage((prev) => [...prev, result]);
};

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文