Not sure if anyone can help but I'm struggling wit...
# kotlin-native
s
Not sure if anyone can help but I'm struggling with creating or getting a thumbnail for a video file in my iOS app. I'm using a
PHPickerView
to show my gallery, I select a video and get a
PHPickerResult
, which has the
itemProvider
that i use to get a
nsUrl
. however if I try to do something like
AVAsset.assetWithURL(videoUrl)
then the asset doesn't seem to be recognized as a video, or readable. I have permissions enabled so I don't think it's that, and I'm able to get photos with the picker. looking for other ideas.
Looks like I figured it out. I guess I had to write the bytes to a temp url. I'm calling
writeToURL(tempUrl)
function before calling
AVAsset.assetWithURL(tempUrl)