Skip to content
This repository was archived by the owner on Nov 3, 2022. It is now read-only.
This repository was archived by the owner on Nov 3, 2022. It is now read-only.

Black screen for certain video files #83

@habim84

Description

@habim84

This is the XAML for the vlc:MediaElement:
<StackPanel> <vlc:MediaElement x:Name="mediaPlayer" AreTransportControlsEnabled="True" HardwareAcceleration="False" Height="1000"/> </StackPanel>
This is the C# code to load the media source onto the MediaElement:

public sealed partial class Player : Page
    {
        private const string FILE_TOKEN = "{SOME GUID}";
        public Player()
        {
            this.InitializeComponent();
            if (!App.setOptions)
            {
                //mediaPlayer.Options.Add("glconv", "direct3d9");
                App.setOptions = true;
            }
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            Episode s = (Episode)e.Parameter;
            StorageFile file = s.episodeFile;
            if (file != null)
            {
                StorageApplicationPermissions.FutureAccessList.AddOrReplace(FILE_TOKEN, file);
                mediaPlayer.Source = null;
                mediaPlayer.Source = $"winrt://{FILE_TOKEN}";
            }

        }

        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
        {
            mediaPlayer.Stop();
        }
}

Somehow for some video files, it works normally but for some files I only get the audio working but the video output is just a black screen. I did try setting the HardwareAcceleration attribute to 'true' but nothing changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions