-
Notifications
You must be signed in to change notification settings - Fork 33
can we try to make it with MediaPlayerElement as well? #50
Comments
Because you can't override the rendering part, you can't set a custom inner mediaplayer.
You can't implement all the features because you will be restricted by the features available in libVLCX, but you should be able to rewrite a lot of things.
No, you can't inherit from the MediaPlayerElement because you can't set a custom MediaPlayer. You must do a custom control and reimplement all the things you want (without the source code of MediaPlayerElement and MediaPlaybackList to help). |
so does that mean we cant even see the code of media element or mediaplayerelement? and you just made a new custom control and rewrite all the features you can think of? Because if we have the actualy c# code of media element and mediaplayerelement, then we can actually rewrite only those parts which use the media player engine and swap that with libvlc engine and other stuff can be mostly be copied over. But we cant see the code right? because I tried to peek the definition and they show us the methods definitions but they are all locked and we cnt see code in them. |
@kakone btw in vs 2017, 15.6 preview 2 they have introduced a new feature in which you can peek definition of compiled libraries and see the actual code with help of a decompiler, not sure whether this feature will also let us see the code for xaml controls. |
It will not help because UWP assemblies are compiled to native code, there is no IL code. I don't think that we will see the source code soon. The only thing we have is the XAML style of the MediaTransportControls (in |
@kakone Thanks for the clarification :) |
@kakone another question regarding the generic.xaml, if I use this file to take out styles, as it is generic.xaml file of Fall creators update, so will that style work fine on previous version as well? considering my app minimum target is creators update? |
Yes, it will work on previous versions. |
According to you, what really useful features available in the MediaPlayerElement control are missing in the VLC.MediaElement control ? |
@kakone MediaPlaybackItem :MediaSource is usually used in mediaelement but mediaplaybackitem is an extension of mediaSource which includes audio tracks, video tracks, and TimedMetaDataTracks ( contains embeeded subtitles in the video file ). MediaPlaybakcList:This list is optimized and specially designed to give features of playlists in the app, and it used a list of MediaPlaybackItems and then there are some methods to shuffle, and do other stuff which typically a playlist does. SMTC:Mediaplayerelement is automatically synced with system media transport controls. we only have to set the thumbnail and file name with them but the pause/play and next/previous buttons of smtc automatically work without any effort. MediaPlayerSetMediaPlayer() is a method on mediaplayerelement, with this we can set a mediaplayer object to it and control all media functionalities with mediaplayerelement.mediaplayer object, a big advantage of this feature is that we can do a lot of custom logic with respect to the app, including a use case in which we can have a global static media player object and assign it to any mediaplayerelement on any page in the app and that media player will retain the file playing and its position and other stuff too, I havent tried to implement this feature yet, but will probably do once I figure out these basic problems. There are many style changes and improved UI in mediaplayerelement as well which will only be known once we explore its style properly. |
@kakone I asked the question about generic xaml styles bcz, there is some stuff in newer SDKs like reveal style on transportcontrol buttons and acrylic background etc. so if I use the latest style, that wont cause a problem in older versions? I mean those styles are automatically responsive to version numbers and we dont have to care about that? |
Yes, if there are some styles that doesn't exist in previous versions, there will be a problem. You can't use runtime API checks to determine the presence of XAML resources. So, you must only use resource keys that are available in the minimum version that your app supports or a XAMLParseException will cause your app to crash at runtime. I'm currently adding the latest version of the MediaTransportControls style with a new RepeatButton. |
@kakone Yeah that is wht I was thinking too. Also what do you think about the mediaplayerelement features I told u ? |
I'm looking the MediaPlayerElement control. I think I will propose a custom VLC.MediaPlayerElement, the features you proposed should be not so difficult to implement. |
@kakone Thats great, and if you need any kind of suggestions or help in that project or detailed docs of any component related to these features I'll be happy to help you in all that . Playing with MediaPlayBackItem : https://docs.microsoft.com/en-us/windows/uwp/audio-video-camera/media-playback-with-mediasource MediaSource: https://docs.microsoft.com/en-us/uwp/api/windows.media.core.mediasource MediaPlayBackItem: https://docs.microsoft.com/en-us/uwp/api/Windows.Media.Playback.MediaPlaybackItem MediaPlayerElement: https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Controls.MediaPlayerElement MediaPlayerPresenter: https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.mediaplayerpresenter MediaPlayer: https://docs.microsoft.com/en-us/uwp/api/windows.media.playback.mediaplayer MediaPlaybackList: https://docs.microsoft.com/en-us/uwp/api/Windows.Media.Playback.MediaPlaybackList P.S : I will suggest you to make the minim project target of VLC.MediaPlayerElement as "Creators Update" Because conditional xaml was introduced in this SDK update and with that xaml becomes very easy and responsive to sdks and we dont have to go through trouble of setting xaml from code behind by checking the API contracts dynamically, it will be beneficial in implementing some features and will be benficial in maintaining the project in the long run, and eventually all devices will update the windows 10 version anyways so very soon anniversay update will be supported by only a few devices. |
@kakone any progress on this? :) |
No, unfortunately, I didn't have time to do it until now. |
@kakone Ok please let me know on this issue when you have time so we can discuss this ( if needs be ) and move this forward thanks |
I knw this question has been asked previously and I already know the answer, that you are actually creating all the features of media element yourself and not using the actual media element I have a few questions regarding that.
The reason I am asking these questions is that is there any possible way that we can use MediaPlayerElement and hence using all its features like MediaPlaybackItem, MediaPlaybackList and all other built in features in uwp. I will be willing to help and achieve this goal if you guide me a little bit how to include vlc library in uwp MediaPlayerElement.
Thanks in advance.
The text was updated successfully, but these errors were encountered: