-
Notifications
You must be signed in to change notification settings - Fork 416
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
[Proposal] MediaElement #113
Comments
The |
MediaElement is essential to many applications and should be added to the Maui.Essentials library the same as haptic feedback is. |
The big difference is that Essentials does not have any UI elements. It will be implemented here as it is in the Toolkit now and hopefully we can transition it into .NET MAUI itself. |
I had thought about whether it could be ported to MAUI and if so what changes, if any, could be made. One thing which did occur - should it follow the UWP model which has seen the MediaElement deprecated for a MediaPlayer and MediaPlayerElement. The latter being the UI control and the former having all the mechanics to playback media. It would mean more flexibility for audio only and not needing to add a UI control in those cases. I think the underlying platform APIs in iOS and Android would also suit this model... |
And I agree with @jfversluis it would be awesome for this control to transition into MAUI itself. |
@peterfoot if you're up for it, it's yours for the taking here :) I think timing-wise we won't be able to get this into .NET MAUI straight-away, so let's get it in here first and then we can start making a case to move it for .NET 7. |
A/V is paramount IMO. This should've been on the timeline from day one facepalm. I'm all for whatever will allow basic playback, but the proposal doesn't mention anything about a Stream as one the source options, and that's the most important IMO. I'm working on a tiny IMediaPlayer interface in my MAUI project to back with native implementations, but maybe I can help on this? I would like to see this ASAP also. |
Thanks @emceelovin! We would love your help with MediaElement 💯 |
@brminnick will do anything I can! |
Adding the We agree that Currently, there is no I've spoken with David Ortinau and Jon Dick on the .NET MAUI Engineering team about this gap in our feature offering. They are currently evaluating the feasibility of creating an official Microsoft-created ExoPlayer binding for For Xamarin.Forms developers, the current recommendation is to use the community-created |
Please also consider DRM (with/without token) ans AES token encryption for streaming. |
I agree. I would consider this to be part of basic audio playback. Playing/looping audio from a memstream (c# memstream etc.), an url (https) or a file (beep.wav - beep.mp3) including DRM content is what is needed for common cross platform apps. |
Yeah you are right :( I'm really sad right now about how our conversation got there, I was just in too much stress and i should have think more about what i going to comment here. |
Don't worry! No harm was done, we're still friends and I understand it comes from a good place. But also want to make sure that you have expectations we can't live up to. Thanks for saying this though, much appreciated! |
@Flaechekueste50 as above, not really. It's being actively developed, no support is given at this time. If you can give me a source URL that will stay online for a while I can add it to #717 and test it out to see what we can do to make it work. |
Will there be any support for streaming over UDP? |
Hey guys these 3 days we were discovered a serious memory leak in MCT MediaElement in our project and we fixed it in Android and Windows(not tested on macOS and iOS), and just wanna return the favor, specially to @jfversluis :) |
@mhrastegari thanks for that <3 First you should work against this branch, when you've everything working just open a PR targeting this branch |
Appreciate it @mhrastegari thank you so much! |
Is my assumption correct that this will support a Stream as source? If so, this will finally fix the issue that we have had for ages that we need to be able to pass a custom header to a uri, since the video files we are playing are coming from an api that needs authentication via the |
@PaulVrugt not sure if that will be possible with the first version. What would passing headers through a stream look like? Do you have some pseudo code or a more thorough explanation of what you want to do? |
|
this is hard coded but im sure you get the idea 😁 |
I have been testing against the nuget package. It has been a great learning experience for me. This is fun! I am working on developing an app to play podcasts from a set of rss feeds from twit.tv. It is working in Windows and Android. Still a lot for me to do to have it ready for testing though. I am planning on looking into helping out here and fixing the issues I am having with maui. I am new to developing and have never contributed to an open source project. I am hoping to make this my first. I am going to go and work on fix to a very minor issue with media element. It might take a week or so to see if I have any hope to help with this. The first thing I want to fix is a problem where if you don't specify in media:MediaElement a WidthRequest and HeightRequest that fits within the android screen the ShowPlayBackControls is missing. Also the video does not show. If you do specify the width and height it works. Has horribly stuttering with the video I am playing. It is streaming over the internet. Not going to try and fix that first lol. I am going to work on something small like the UI issue. Wish me luck! |
Hey @ne0rrmatrix i believe this can help you for your fullscreen issue. |
Hi try to find the source code for the Media Element to test I I can add support for subtiles on Android but can't find the source. Is not the MediaElement open source? //Thanks Joacim |
The code hasn't been merged into main yet. The work is still ongoing under the PR #667 |
What I need is this on the ExoPlayer
Thanks //Thanks Joacim |
@JoacimWall let's wait until If you really need it right now then you should be able to indeed do it with a custom mapper entry. Something like this: MediaPlayerHandler.PropertyMapper.AppendToMapping("subtitleMapper", (handler, player) =>
{
#if ANDROID
handler.PlatformView.GetFirstChildOfType<StyledPlayerView>()?.SetShowSubtitleButton(true);
#endif
}); |
Ok no problem. Thanks for the handler code. |
With stuff still in early alpha on this build what sort of things can we do that will be helpful? I am learning about maui, mvvm as quick as I can. I am going through and learning about maui and trying to figure out all the ins and outs so I can contribute by fixing bugs myself. I want to help and provide solutions to issues not just submit bugs. I have all the time in the world and want to contribute. I have learned a lot already. But I am in the process of trying to figure out how to understand how the community toolkit and this project fit together with dotnet maui. I plan to keep figuring it out over the next month. I have learned how to use the community toolkit to do almost all of things I want. But I need to learn the maui long hand way to contribute and make my life easier I think? Most of the issues I have had with maui so far I have found to be user errors on my part on how I implement something. I am this week going to spend my time going over and doing everything the long way so I can learn the structure of how maui is done without the toolkit. This is in the hopes of making it easier to learn how to contribute to toolkit and understand the structure of the code. I have been going through the toolkit and looking at the code. |
Reopening Proposal. Only Proposals moved to the |
Hello, |
MediaElement
Summary
MediaElement is a view for playing video and audio. Media that's supported by the underlying platform can be played from the following sources:
The device's library.
Detailed Design
MediaElement.shared.cs
Usage Syntax
The text was updated successfully, but these errors were encountered: