使用react-native-video播放简单视频时,它在较旧的设备(ipad 2,ipad 3rd gen(A1416))上以大于1024x768的分辨率失败,出现以下错误。
{
"target": 4,
"error": {
"code": -11855,
"domain": "AVFoundationErrorDomain"
}
}
我在AVFoundation错误常量列表中找不到此错误。它停在-11852。
通过测试发现,我可以在第二代或第三代ipad上使用的最大分辨率为1024x768,但是我在任何地方都找不到此文件。ipad mini 2可以以2048x2048的速度播放视频而不会出现问题。
我可以使用哪种分辨率才能在所有iPad上使用?我可以在功能不同的iPad上显示不同的媒体,例如1x和2x图像吗?
iPad 2 has the following specifications:
Video formats supported:
Source: https://support.apple.com/kb/sp622?locale=en_GB
iPad 3 has the following specifications:
Video formats supported:
Source: https://support.apple.com/kb/sp647?locale=en_GB
As you can see, it doesn't support resolution greater than 1080p i.e. 1920 by 1080 so 2048 by 2048 won't work.
-18555 error description is in file AVError.h (https://developer.apple.com/reference/avfoundation/averror/averrorundecodablemediadata)
AVErrorUndecodableMediaData NS_AVAILABLE(10_10, 8_0) = -11855,
尽管没有给出足够的描述来给出具体的结论,但是从名称上我们可以说这意味着它无法解码视频,因为它超出了设备的功能。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句