microsoft-ui-xaml
microsoft-ui-xaml copied to clipboard
WinUI MediaPlayerElement
I need MediaPlayer on WinUI or Reunion for Windows
On the page : https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.mediaplayerelement?view=winrt-20348
I read : Equivalent WinUI class: Microsoft.UI.Xaml.Controls.MediaPlayerElement.
if using Microsoft.UI.Xaml.Controls.MediaPlayerElement;
But MediaPlayerElement is not present on :
WinUI UWP, WinUI for Desktop , Project Reunion 0.5.7 and 0.8.0 with .NET 5
What is wrong ? How to use MediaPlayerElelemnt ?
MediaPlayerElement isn't currently supported in Winui3,
@MikeHillberg @codendone or @Austin-Lamb to weigh in on the plan for it.
See the WinUI 3.0 Feature Roadmap for the latest status on plans, including Media Controls. We currently do not have a specific release timeline for MediaPlayerElement.
I wonder if it will include MediaElement or will it be removed as previously deprecated control.
It would be pretty helpful for us to have the MediaPlayerElement available to WinUI applications.
We use video content in our educational app to help users learn and complete their school activities, so Media Player support would be very helpful. Rather than sending students out of the app to a browser to view the video content, we’d like to have them view their content inside the app while doing their programming work.
We also believe the MediaPlayerElement would allow us to swap out our large library of sounds (which are mono, low bit-rate .wav files), for higher fidelity stereo .mp3 files. This would help us reduce our app install size as well. The Sound Player we are currently using doesn't have a way for us to detect when a sound is done playing, the MediaPlayerElement does.
Overall, better video playback would ensure that our Windows app is competitive with the other versions of our app on iOS, macOS, Android, and ChromeOS, and better ensure the Windows app is a viable solution for our ~200,000 MAU during the school season.
I wanted to port my WPF app to WinUI 3 which relies heavily on video playback. This is very disappointing. Please add support for this!
I contribute to an UWP app with background audio streaming (radio). Would be nice to convert the app to WinUI 3, so no media support would be a show stopper.
I would like to update my Video Detail Player to WinUI 3 in the near future. This kind of blocks me. The MediaPlayerElement
in UWP evolved in pretty useful control I have to say, it's shame to leave it behind (But I also understand, it's not easy to port it).
I would like to update my Video Detail Player to WinUI 3 in the near future.
Same goes for my app Chronotron. Is it possible to mix and match UWP/WinUI3 controls? (e.g. using the old Windows.UI.Xaml.MediaPlayerElement in a WinUI 3 UWP app?)
We urgently need the Control MediaPlayerElement or MediaElement! The roadmap says it will come in a future release, but we need to know when (Q1, Q2?). We would very much like to switch our UWP app to WinUI3 because we urgently need WebView2, but as long as there is no MediaElement, we cannot make the switch.
For me this issue is also problematic since it is not possible to use XAML Islands in WPF with .NET 5/6 and WinUI3 doesn't support MediaPlayerElement. So other than creating/using a third party media control I think the only solutions are to use either .NET Core 3.1 or UWP? Which both are end-of-life.
Microsoft, please tell us, will you offer the MediaControls at all? More than half a year is invested in the acrylic features. Who needs that? Would it be possible to know how much longer we have to wait? Unbelievable!
You can load the video in a WebView2 and use the HTML5 video API via JavaScript interaction.
You can load the video in a WebView2 and use the HTML5 video API via JavaScript interaction.
That's a possibility if playing videos is a marginal feature. We have a digital signage system where this is one of the core features... In addition, there are problems in memory management with WebView2 that can only be solved with WorkAround's.
You can load the video in a WebView2 and use the HTML5 video API via JavaScript interaction.
For me this is probably also not a solution because I create an overlay using a IBasicVideoEffect.
For me this is probably also not a solution because I create an overlay using a IBasicVideoEffect.
Yes, audio and video effects are a must have, at least for me.
For me this is probably also not a solution because I create an overlay using a IBasicVideoEffect.
Yes, audio and video effects are a must have, at least for me.
Never tried it but maybe you could implement custom effects in JavaScript as well and trigger them from within your .NET app.
Never tried it but maybe you could implement custom effects in JavaScript as well and trigger them from within your .NET app.
Yeah, or we can try to write the whole app in some other technology than c# and xaml. ToTalLy ViAbLe oPtioN... "Fck you in particular UWP developers!" No feature parity in platform you invested in, and even not enough feedback!
Yeah, or we can try to write the whole app in some other technology than c# and xaml. ToTalLy ViAbLe oPtioN... "Fck you in particular UWP developers!" No feature parity in platform you invested in, and even not enough feedback!
Indeed. Quoting myself from https://github.com/microsoft/WindowsAppSDK/discussions/1055#discussioncomment-1282924: "Otherwise, if the cost of moving ahead is rewriting most of the app, I'd rather do it on a platform that shows better commitment to its developers."
This is exactly where Microsoft finally has to say honestly if and when the important controls (MediaPlayerElement, InkCanvas and Win2D) will be made available. Not making any statements is very disrespectful to the community.
This is the only remaining showstopper for our primary app that relies on MediaPlayerElement.
We are in a similar situation to many on this thread. We want to move up to WebView2, but our app also has a video/audio playing component. So - WinUI 2.8 (with WebView2) is not released - and with no clear timeframe on release. And WinUI 3.0 has WebView2, but is missing MediaPlayerElement etc. - and no clear timeframe on release.
Looking at the number of commits and active contributors draws a dark shadow over my heart. For such a project to succeed, there must be a big team working actively on it. Now, WinUI 3 looks like a hobbist project. MAUI gets more love even in the newsletters, while WinUI 3 is nowhere to be seen.
WinUI 3 is nowhere to be seen
I keep saying Microsoft abandoned UWP way too early. Perhaps they underestimated the work to be done to get WinUI 3 to feature-parity, or just decided that the few of us developing UWP apps should be "sacrificed".
In all fairness, UWP still works just fine as-is. They just decided that adding more features to it (esp support for .NET 5+) would be way too much work, which is hard to evaluate unless you understand these technologies at the deepest level.
To get back on topic, I am also really surprised and disappointed that they haven't provided a precise roadmap for the MediaPlayerElement
. There is likely a big hurdle to overcome, but we don't even know what that is.
In all fairness, UWP still works just fine as-is.
I kind of agree with this statement, as long as you don't rely on too many 3rd party libraries. The feature I'm perhaps hoping the most for is ARM64EC support in .Net Native, which in all fairness, isn't supported in .Net 5/6 either!
But really, look at this: Accouncing Net 7 Preview 1 There is not a single word about WinUI. Not a single one.
Hey folks,
I've put together a sample for what could be a replacement for MediaPlayerElement
in WinAppSDK for scoped-down scenarios; it's a prototype at this point, doesn't support fullscreen, I haven't tried it with DRM content, and it does not include the full media transport controls, but maybe even in this state it is useful to the folks on this thread.
You can find it here: https://github.com/asklar/WinAppSDK-MediaPlayer
PRs welcome :)
It's more of a strategic thing. I am not allowed to use any third party technology that is a core functionality of the application. For apps where that is a minor matter, great thing. Couldn't that be an inspiration for the winui3 developers?
Hi @agenne, Disclaimer: I'm a developer in the Windows Developer platform team :) In order for this control to be part of the built-in WinUI 3 controls., it would likely require significant amounts of additional work to fill in the gaps relative to what the XAML control offers. Even if this was treated as just a stepping stone, it would take work to convert the prototype into a reusable control, integrate it into the existing codebase, etc. so it's "free" as in "free puppy", not as in "free beer" :).
For many apps, those gaps are non-blocking, so they would be able to be unblocked by the code I shared above (maybe they just need a little bit more e.g. a seek bar).
@asklar Thank you for providing the sample. Having something basic that can fill the need of just playing a media file would indeed alleviate a large part of this issue.
Can you explain what the sample is doing? (You could put it directly in your ReadMe)
Also, is it in C++ because it uses Direct3D? (If so, could something like SharpDX or its successor achieve the same result in C#?)