Comments (12)
Yes, you are right. As it's a Windows Runtime Component, you can't inherit from the MediaElement or MediaTransportControls classes. The first workaround would be to remove the sealed keyword and to compile as a class library (perhaps I could do a second nuget package for this).
Other workaround (ugly) : add your custom buttons in another button bar in the Content property of the MediaTransportControls.
from vlc.mediaelement.
yeah I did the other work around it works but it doesnt look so good for the user, so 1st work around would be the best, can you please do that and update the respository and nuget package? or perhaps you can guide me how to do it quickly? I mean I am using nuget package right now, but I can download the repo directly from here and if I just remove the sealed keyword from the class will it work fine ? or are there any more steps to follow?
from vlc.mediaelement.
I created a new package.
Add this package instead of the Windows Runtime Component package and you should be able to create some custom media transport controls.
from vlc.mediaelement.
thnks a lot
from vlc.mediaelement.
I just tried to create a simple inherited custom transport control following Microsoft docs and I got a null refrence exception on many objects within VLC namespace. have you tested the class library package to create custom control? if yes then can you please provide me a very basic and simple sample to do so?
from vlc.mediaelement.
Yes, I tested it quickly. Here is a sample project : App1.zip (it's follow the documentation using this Generic.xaml file).
from vlc.mediaelement.
I tried to compile the sample project you provided but its giving very basic compile time errors for unknown reasons, for example its not even recognizing System namespace that is why it has a lot of compile time errors. Also I checked the refrence node, there is no refrence for vlc media element class library nuget package or no second project of the class library to refrence to.
from vlc.mediaelement.
Right click on the Solution and choose 'Restore Nuget Packages', it must restore the VLC.MediaElement.ClassLibrary nuget package and you will see it in the References.
from vlc.mediaelement.
Error occurred while restoring NuGet packages: Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'.
Failed to download package 'Microsoft.Net.Native.SharedLibrary-x64.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg' has timed out after 100000ms.
from vlc.mediaelement.
these are the errors I recieve when I try to restore nuget packages.
from vlc.mediaelement.
Strange error, you seems to have a problem to access nuget.org.
Did you try this workaround ? https://stackoverflow.com/a/44038629
from vlc.mediaelement.
i tried it also failed, can you please provide me a project where I dont need to restore packages?
from vlc.mediaelement.
Related Issues (20)
- Track position change event? HOT 3
- Adaptive Live Stream seems to be broken HOT 1
- Using ShowLoginDialog HOT 3
- Is it possible to receive events (logs) from VLC libs for debugging?
- logging event is does not work HOT 1
- direct3d11 vout display error: Failed to resize the backbuffer
- Can't find the stream to Chromecast button. HOT 1
- Media Control Customize?!
- How to set media source for streaming/casting and play it to device? (+some other questions)
- Impossible to set "Custom-Headers"? Like User-Agent? HOT 1
- ARM64 Support? HOT 1
- vlc:MediaTransportControls IsCompact="True" property causes "Layout cycle detected" error in XAML HOT 1
- Black screen for certain video files
- Catch the VideoLoadingCompleted Event
- Memory heap issues when stopping media player
- Add support for D-pad navigation
- Is is possible to use in XAMLIsland environment?
- . HOT 3
- The control might be incompatible with forthcoming WinUI3 library
- Can anyone try playing these videos using libvlcsharp? I don't know why it's not smooth
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vlc.mediaelement.