Piwigo-Android icon indicating copy to clipboard operation
Piwigo-Android copied to clipboard

Video support

Open ramack opened this issue 6 years ago • 5 comments

support uploading, and showing videos, also edit delete and download them.

ramack avatar Sep 25 '18 19:09 ramack

Here is a screenshot of the iOS app with an album containing a video. We have a specific icon on top of the thumbnail.

IMG_7057

cc @EddyLB

plegall avatar Mar 11 '20 14:03 plegall

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.

ramack avatar Mar 11 '20 17:03 ramack

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 avatar Mar 31 '20 18:03 WisdomCode

@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?

ramack avatar Mar 31 '20 20:03 ramack

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;
     }

EddyLB avatar Apr 01 '20 05:04 EddyLB