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

[UWP] File name and directory name are not getting set correctly for the video taken using StoreVideoOptions #308

Closed
sacheinbaala opened this issue Jul 24, 2017 · 1 comment · Fixed by #826
Assignees
Milestone

Comments

@sacheinbaala
Copy link

sacheinbaala commented Jul 24, 2017

Bug Information

File name and directory name are not getting set correctly for the video taken using StoreVideoOptions

Version Number of Plugin: 3.0.1
Device Tested On: Microsoft Surface Laptop with Windows 10 and Microsoft Lumia Mobile with Windows 10
Simulator Tested On:
Version of VS: 15.2 (26430.14)
Version of Xamarin: 4.5.0.486 (fec6f88)
Versions of other things you are using:

Steps to reproduce the Behavior

  1. Install MediaPlugin to your Xamarin Forms application
  2. Handle Button click to take video specifying StoreVideoOptions with SaveToAlbum, Name and Directory properties set (refer screenshots)
  3. Run the application and click on the button to take video.

Expected Behavior

Video should be captured and stored in the specified directory folder with the specified name.

Actual Behavior

Video is getting stored in "TempState" directory with File name as "CCapture"

Code snippet

    private async void Video_Tapped(object sender, EventArgs e)
    {
        await CrossMedia.Current.Initialize();

        if (!CrossMedia.Current.IsCameraAvailable
            || !CrossMedia.Current.IsTakeVideoSupported)
        {
            await DisplayAlert("No camera", "No camera available on the device!", "Ok");
        }

        var file = await CrossMedia.Current.TakeVideoAsync(new StoreVideoOptions
        {
            SaveToAlbum = true,
            Quality = VideoQuality.Medium,
            Directory = "MyProjectFolder",
            Name = $"{DateTime.UtcNow.Ticks}.mp4"
        });

        if (file == null)
        {
            return;
        }

        await DisplayAlert("Video recorded", $"Location: {file.Path}", "Ok");
        file.Dispose();
    }

Screenshots

mediaplugintakevideocode
videocapturedscreenshot

@prashantvc
Copy link
Collaborator

Marking this bug confirmed. I am able to reproduce this issue with Media plugin v3.0.1

Test case: VideoUwpApp.zip

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

Successfully merging a pull request may close this issue.

3 participants