Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unofficial release of LibVLCSharp.Avalonia to solve some issues #294

Closed
wants to merge 10 commits into from

Conversation

radiolondra
Copy link

@radiolondra radiolondra commented Apr 5, 2022

Description of Change

Created new VideoView.cs

Issues Resolved

  • Embed LibVLCSharp Avalonia VLC VideoView in Avalonia UserControl

  • Put and use an Avalonia UserControl on top of VideoView (VLC MediaPlayer), for example, a set of buttons/controls to control the VLC MediaPlayer.

  • fixes #525

  • fixes #408

API Changes

None

Platforms Affected

  • Avalonia

Behavioral/Visual Changes

  • Users can embed VideoView in Avalonia UserControl (not only in a window)
  • Users can put a UserControl on top of MediaPlayer

Before/After Screenshots

See (after)screenshots in LibVLCSharp.Avalonia.Unofficial.Samples README.md

Testing Procedure

See the LibVLCSharp.Avalonia.Unofficial.Samples added to the repo.

PR Checklist

  • Rebased on top of the target branch at time of PR
  • Changes adhere to coding standard

Copy link
Member

@mfkl mfkl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there,

Thanks for your PR!

I have a few notes though, see my comments in the thread.

For the samples, I think we should do the same as for the WPF samples. No need to add new projects or SLN files, we can just have 2 buttons on the main window of the app, and the user can select either scenarios to test!

Let us know if you have any questions regarding the comments :)

@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why create a new Unofficial package? IMO this csproj is not needed, we can use the current one https://github.com/videolan/libvlcsharp/blob/3.x/src/LibVLCSharp.Avalonia/LibVLCSharp.Avalonia.csproj

@@ -0,0 +1,25 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sln is not needed as well, since we will re-use the current avalonia project.

@@ -0,0 +1,15 @@
# LibVLCSharp.Avalonia.Unofficial
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,317 @@
using System;
using System.Reactive.Disposables;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to use System.Reactive for now, if we can do without.

using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.VisualTree;
using CSharpFunctionalExtensions;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also a dependency that should be removed.

@@ -0,0 +1,317 @@
using System;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the existing videoview should be modified, to support these scenarios. Much like the WPF videoview.

@radiolondra
Copy link
Author

radiolondra commented Apr 7, 2022

Martin,

thank you for the time you spent to review my PR.

I created a new Unofficial project for LibVLCSharp.Avalonia to give people the ability to choose between a partially working solution (Original project) and this Unofficial solution which, in a way or another, covers all the Avalonia's users requests (VideoView inside an Avalonia UserControl and a dynamic layer on top of the MediaPlayer).

I perfecty understand your requests to change VideoView code, to satisfy the rules Videolan in some way imposes, so that this Unofficial solution can became the ONLY solution for Avalonia users. In this regard I would like to mention that ReactiveUI is now widely used, at least in .NET 5/6 with Avalonia.

However, the required changes need several time, both in coding and, especially, in testing. And, at this moment, I don't have this time available.

Therefore, feel free to reject my PR. Interested users will still be able to find the solution to their requests and questions using the links at the bottom of this post.

I thank you anyway for your attention to the project.

Have a serene day.
Roberto

Avalonia Unofficial LibVLCSharp External Links

VLC video player inside an Avalonia Window/UserControl embedding single static customizable control (e.g.player buttons)
LibVLCSharp.Avalonia.Unofficial

VLC video player inside an Avalonia Window/UserControl embedding multiple draggable customizable controls (e.g.player buttons, images,...)
LibVLCSharp.Avalonia.Unofficial.UCanvas

LibVLCSharp.Avalonia.Unofficial Samples
LibVLCSharp.Avalonia.Unofficial.Samples

LibVLCSharp.Avalonia.Unofficial.UCanvas sample
LibVLCSharp.Avalonia.Unofficial.UCanvas.Samples

YAMP 2 - Open source video player sample using LibVLCSharp.Avalonia.Unofficial library
Github sources
Watch YAMP2 in action

@mfkl
Copy link
Member

mfkl commented Apr 19, 2022

However, the required changes need several time, both in coding and, especially, in testing. And, at this moment, I don't have this time available.

Well, that's too bad. If you can, keep your code available so that community members may be able to work on getting it merged to libvlcsharp.avalonia proper.

Cheers!

@JMND3v
Copy link

JMND3v commented Aug 15, 2024

Martin,

thank you for the time you spent to review my PR.

I created a new Unofficial project for LibVLCSharp.Avalonia to give people the ability to choose between a partially working solution (Original project) and this Unofficial solution which, in a way or another, covers all the Avalonia's users requests (VideoView inside an Avalonia UserControl and a dynamic layer on top of the MediaPlayer).

I perfecty understand your requests to change VideoView code, to satisfy the rules Videolan in some way imposes, so that this Unofficial solution can became the ONLY solution for Avalonia users. In this regard I would like to mention that ReactiveUI is now widely used, at least in .NET 5/6 with Avalonia.

However, the required changes need several time, both in coding and, especially, in testing. And, at this moment, I don't have this time available.

Therefore, feel free to reject my PR. Interested users will still be able to find the solution to their requests and questions using the links at the bottom of this post.

I thank you anyway for your attention to the project.

Have a serene day.
Roberto

Avalonia Unofficial LibVLCSharp External Links

VLC video player inside an Avalonia Window/UserControl embedding single static customizable control (e.g.player buttons)
LibVLCSharp.Avalonia.Unofficial

VLC video player inside an Avalonia Window/UserControl embedding multiple draggable customizable controls (e.g.player buttons, images,...)
LibVLCSharp.Avalonia.Unofficial.UCanvas

LibVLCSharp.Avalonia.Unofficial Samples
LibVLCSharp.Avalonia.Unofficial.Samples

LibVLCSharp.Avalonia.Unofficial.UCanvas sample
LibVLCSharp.Avalonia.Unofficial.UCanvas.Samples

YAMP 2 - Open source video player sample using LibVLCSharp.Avalonia.Unofficial library
Github sources
Watch YAMP2 in action

Has this been showcased already? The Avalonia community needs to know this wonderful contribution!

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

Successfully merging this pull request may close these issues.

3 participants