Piwigo-Android
Piwigo-Android copied to clipboard
Video support
support uploading, and showing videos, also edit delete and download them.
Here is a screenshot of the iOS app with an album containing a video. We have a specific icon on top of the thumbnail.
cc @EddyLB
that's good, yes. Do we see in the REST data that a photo is a video? - It will take some time until this will be handled in the android app I guess, but then it would be great to have the details here.
I would like to help with that if possible. I couldn't find a direct indicator for videos, however, the element_url (so the link to the raw file) links to a file ending with mp4 (only this format is supported on ios as well), so it should be pretty easy to distinguish between an image and a video.
@WisdomCode great, looking forward to your contribution! Whenever a question comes up, don't hesitate to contact me.
@EddyLB, @plegall is there a better way to identify a Video via REST than the extension?
I have not found a way to exploit an API method and therefore use the extension to detect whether an image is a video:
imageData.fileName = [NetworkHandler UTF8EncodedStringFromString:[imageJson objectForKey:@"file"]];
NSString *fileExt = [[imageData.fileName pathExtension] uppercaseString];
if ( [fileExt isEqualToString:@"MP4"] || [fileExt isEqualToString:@"M4V"] ||
[fileExt isEqualToString:@"OGG"] || [fileExt isEqualToString:@"OGV"] ||
[fileExt isEqualToString:@"MOV"] || [fileExt isEqualToString:@"AVI"] ||
[fileExt isEqualToString:@"WEBM"] || [fileExt isEqualToString:@"WEBMV"] ||
[fileExt isEqualToString:@"MP3"])
{
imageData.isVideo = YES;
}