GithubHelp home page GithubHelp logo

Comments (17)

kakone avatar kakone commented on July 30, 2024
  1. Why arent you using the actualy uwp media element?

Because you can't override the rendering part, you can't set a custom inner mediaplayer.

  1. Can we implement all the features of MediaPlayerElement? just like you implemented features of media element?

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.

  1. Or can we create a custom inherited control from MediaPlayerElement and then somehow use vlc library in it?

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).

from vlc.mediaelement.

touseefbsb avatar touseefbsb commented on July 30, 2024

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

from vlc.mediaelement.

touseefbsb avatar touseefbsb commented on July 30, 2024

@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.
here is the link where they discribe this feature. what do you think will it help us in our particular scenario?
https://www.visualstudio.com/en-us/news/releasenotes/vs2017-preview-relnotes#productivity

from vlc.mediaelement.

kakone avatar kakone commented on July 30, 2024

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 C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\10.0.16299.0\Generic\generic.xaml file). We have to rewrite the rest.

from vlc.mediaelement.

touseefbsb avatar touseefbsb commented on July 30, 2024

@kakone Thanks for the clarification :)

from vlc.mediaelement.

touseefbsb avatar touseefbsb commented on July 30, 2024

@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?

from vlc.mediaelement.

kakone avatar kakone commented on July 30, 2024

Yes, it will work on previous versions.

from vlc.mediaelement.

kakone avatar kakone commented on July 30, 2024

According to you, what really useful features available in the MediaPlayerElement control are missing in the VLC.MediaElement control ?
I think we can easily rewrite a VLC.MediaPlayerElement in the library. The two controls will use the same MediaTransportControls.

from vlc.mediaelement.

touseefbsb avatar touseefbsb commented on July 30, 2024

@kakone
well if you are willing to do that then I can give you a complete and detailed list of features tht why mediaplayerelement is a lot better than media element, but for now some of the main features are following.

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.

MediaPlayer

SetMediaPlayer() 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.

from vlc.mediaelement.

touseefbsb avatar touseefbsb commented on July 30, 2024

@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?

from vlc.mediaelement.

kakone avatar kakone commented on July 30, 2024

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.

from vlc.mediaelement.

touseefbsb avatar touseefbsb commented on July 30, 2024

@kakone Yeah that is wht I was thinking too. Also what do you think about the mediaplayerelement features I told u ?

from vlc.mediaelement.

kakone avatar kakone commented on July 30, 2024

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.

from vlc.mediaelement.

touseefbsb avatar touseefbsb commented on July 30, 2024

@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 .
for now following are some useful docs regarding some important objects.

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.

from vlc.mediaelement.

touseefbsb avatar touseefbsb commented on July 30, 2024

@kakone any progress on this? :)

from vlc.mediaelement.

kakone avatar kakone commented on July 30, 2024

No, unfortunately, I didn't have time to do it until now.

from vlc.mediaelement.

touseefbsb avatar touseefbsb commented on July 30, 2024

@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

from vlc.mediaelement.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.