-
Notifications
You must be signed in to change notification settings - Fork 471
[Bug] MediaElement XCT v2.0.6 not working with UWP #1972
Comments
I have built a custom renderer package in the past that performed this functionality for UWP/Android. I was never able to get the native compile option to work, but I was able to build in release without the native compile flag. I don't think the native compile is required for store, just a little performance hit at load time. Have you tried release build without the native compile flag? I can't remember details at this point, but it is possible that some required files are missing in the package for UWP... there are some non-binary resources needed in the package for UWP that may be the issue here, if you can't build release without native compile flag. |
@jasells thank you for that input, I've been looking at creating a custom renderer and I'm thinking that is the direction to go in. Just to clarify though the build works fine in Debug and Release with or without the 'Compile with .Net native tool chain', it's only the very last step in submitting it to the MS Store that the option becomes mandatory, I've tried several times without the .net native compile option and every time the automated certification process fails and won't generate the needed app package to upload to the store. |
I assume that's what is being done in here in the Community TK code base as well... So, I'm not sure if there's anything that can be done about the native compile? The issue is that the .Net I'd be interested to know if you resolve it. I'd guess you need to look into UWP forums for help on this (compiling UWP to native with a .Net->native-interop dependency)? Hopefully someone is still around that knows something about that platform. Maybe the Windows store has support that could help? What I can remember without going back and looking at code is that the actual codec/runtime is the same native code that Windows Media player uses and that WPF has a One thought I just had is to try to write a pure UWP app (as simple as possible) that has the video player capabilities you need and see if you can get the native compile to work there? Not sure that helps... |
@jasells thanks for the info, I'll dig into the native compile some more and see what I can find but for now my manager thought of a work around and so far so good (using a WebView pointed to a page with an html video player that gets feed an encrypted string so it streams directly from azure). Kind of crazy we had to resort to this but this was getting to be a major issue for our product. |
Description
When creating a ContentPage to modally display videos taken in our application the MediaElement does not display the loaded video or controls, only a box with the set background color and width/height for UWP (tested on local machine and various Surface tablets with no luck). The MediaElement works fine on Android and I have tested with all version of Xamarin Community Toolkit from v1.0.3 through 2.0.6 with various combos of Min Version and Targeting Version without any success. The only way in which I can get the videos to play on a UWP device is by disabling the 'Compile with .Net native tool chain' in properties and debug but the app certification will not pass without that option enabled. I have taken the basic implementation from this repo using a static web source and still get the black box, same when setting the source to use our Azure's video stream service. I have also wired up the MediaOpened, MediaFailed, and MediaEnded but these methods only fire when running on Android and there are no errors reported in the output for UWP.
UI Implementation:
Relevant code behind:
Basic Information
Reproduction imagery
The text was updated successfully, but these errors were encountered: