When "config.library.mediaType = YPlibraryMediaType.photoAndVideo", I only want to choose photo or only video. How can i do.
First of all, Sorry for my poor English. When "config.library.mediaType = YPlibraryMediaType.photoAndVideo". We can both choose photo and video. But I only want to choose photo or video. So when I set config.library.mediaType = YPlibraryMediaType.photo. There is only one way to select the video that is use YPImagePicker to record a video. So how to do that when I choose the photo then I can't choose video or when I choose the video then I can't choose photo when "config.library.mediaType = YPlibraryMediaType.photoAndVideo"?
@Songyeyaosong I don't think this library has the capability to do what you want. You would have to show a prompt to the user asking if they would like to select a photo or video and then based on that choice, present the media picker with the correct configuration. You could also fork this library and add a case photoOrVideo to YPlibraryMediaType and implement the logic yourself.
case .photo:
config.screens = [.photo, .library]
config.library.mediaType = .photo
case .video:
config.screens = [.library, .video]
config.library.mediaType = .video
Please see if this may help you @Songyeyaosong