ImageRow
ImageRow copied to clipboard
Any plan to support video?
It would be great to select videos
Any update on this?
This is not in the roadmap for now but we could add an example.
You could try setting presentationMode
or using row.onPresent
to configure the picker controller
Thinking it through a bit more, you cannot use ImageRow as the value of the row is an UIImage
and you will probably want an URL
or something to represent the video.
What can be done is: create a new row using most of the logic from ImageRow, set the type of the value of the row to URL
, change the ImagePickerController to take set the url of the picked video as value of the row. Finally get a thumbnail of the video to show in the row (could be done with AVAssetImageGenerator).
However, this would be a row to pick a video and not a video or image. For that we would have to create a row whose value is an enum or other structure to allow both.
Does this sound reasonable?
Maybe we can create a row whose return value is PHAsset? That way the image and video would both be supported.
That would be possible, yes
For selecting only videos use VideoRow.
Choosing images or videos requires a bigger restructure of ImageRow as mentioned above.