-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Adding a MediaPlayerElement to Maui #352
Conversation
…ement port to .NET MAUI. Compiles and runs.
App life cycle management rewrite. App state save.
Corrected the Strings.fr.resx build problem. Forward icon was not visible because the svg icon had the wrong name. Icons are white, until we find a better way to handle colors.
New Sample with multiple MediaElementPlayers in the same project.
The implementation is close to complete for Android but probably needs further testing.
It's possible the issues I mention were there already in the Xamarin version. Please review and provide feedback. |
For some reason, you need to specify the complete path to the type on Windows.
I'm wondering whether it would be possible to keep the same code for XF and MAUI and just use #ifdef? Depends how much code is the same or different, besides namespaces. Will attempt to run the iOS sample next week, keep you posted. |
I guess it's possible in theory but I'm not sure how you're going to manage this. The way I see this is that it's probably less work to maintain both projects rather than having to add all the #ifdefs. Maybe there is an easy way to do such thing that I don't know of? |
Managed to display the play/pause icons in iOS with a hack. mfkl@66d3d52; Still need to figure out how to include them transitively (from libvlcsharp.maui) as they were not present in the app bundle. MAUI expects png references from XAML or C# as it translates the svgs. The path from the generic theme appears to be from the app bundle, not the code project. |
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-android|AnyCPU'"> | ||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-ios|AnyCPU'"> | ||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-android|AnyCPU'"> | ||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0-ios|AnyCPU'"> | ||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
</PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these can be removed.
<ItemGroup> | ||
<AndroidResource Remove="Handlers\**" /> | ||
<Compile Remove="Handlers\**" /> | ||
<EmbeddedResource Remove="Handlers\**" /> | ||
<MauiCss Remove="Handlers\**" /> | ||
<MauiXaml Remove="Handlers\**" /> | ||
<None Remove="Handlers\**" /> | ||
</ItemGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these lines can be removed too I guess
I'm thinking we can remove the Shared folder and namespace. |
For the image issue on iOS, Maui is supposed to translate them into pngs during build with proper size options but there are various bugs preventing it from doing it transitively. With a BundleResource I managed to have them in the app bundle but they're not translated into pngs and iOS cannot read SVG natively... So we might be better off sticking to FontAwesome for now, as XF was doing. |
Alright, thanks for the review. I'll update the PR based on your comments and will revert back the Fontawesome removal with the hope we won't face the same issue with icons. |
hi, |
Hello, I'll update the PR with the points discussed here by the end of next week. What platform are you interested in? |
Hi, |
Alright, in this case, if you're in a hurry, my PR code is working already and not much will change before the final version on Android. We're only having this bug on iOS that is not including the button icons from the library to the main project. I'm just going to revert to using fonts like the original xamarin was doing. Meaning you can potentially start integrating it in your project. If not, stay tuned for my update next week. Then it will probably take a little longer for the VLC# people to accept the PR. |
Hi, we do not provide delivery estimate for opensource work, it is released when it's ready. If you'd like to speed up the process, you may check out the PR's branch locally and help improve it by fixing the remaining issues. Thanks. |
Hi, |
I'm closing this PR to sync my fork and create a new PR. |
Description of Change
This draft PR includes the implementation of a MediaPlayerElement for Maui. The changes include:
Issues Resolved
Other Changes
Platforms Affected
Behavioral/Visual Changes
None
Before/After Screenshots
Not applicable
Testing Procedure
Not applicable
PR Checklist