Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Picking videos - Path does not have proper file extension #754

Closed
kcrandall opened this issue Oct 12, 2019 · 1 comment
Closed

Picking videos - Path does not have proper file extension #754

kcrandall opened this issue Oct 12, 2019 · 1 comment

Comments

@kcrandall
Copy link

Bug Information

Version Number of Plugin: 4.4.1
Device Tested On: iPhone 11 Pro
Simulator Tested On: None
Version of VS: 8.3.3 MacOS
Version of Xamarin:
Versions of other things you are using: N/A

Steps to reproduce the Behavior

Pick Video on iOS device and print Path.

Expected Behavior

Returns file with proper extension

Actual Behavior

Does not include a "." in the extension. trim_15708509373509446EF85-239D-4BBB-ACC9-B3128EEEACC3MOV is an example of a file name without the period just MOV no dot. This could be hard to figure out the mime type if you are dealing with more then 2-3 potential media formats that aren't pre defined. Also, I'm not sure if they always end in MOV or if sometimes they don't even have that which could be even more problematic. Thanks, love this plugin.

Code snippet

LoggingController.Info("PickVideoTapped");
                    await CrossMedia.Current.Initialize();

                    if (!CrossMedia.Current.IsPickVideoSupported)
                    {
                        //DisplayAlert("No Camera", ":( No camera available.", "OK");
                        return;
                    }

                    MediaFile file = await CrossMedia.Current.PickVideoAsync();

                    if (file == null)
                        return;
                    LoggingController.Info("File is not null");
                    LoggingController.Info(file.Path);
                    LoggingController.Info(file.AlbumPath);
@jamesmontemagno
Copy link
Owner

Good catch, I changed the logic to return the actual extension instead of always .mp4 and forgot a . in there... whoops :)

iOS captures videos as .MOV so this is correct from what I have seen. Will push out 4.4.2-beta

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants