Xamarin - How to play an embedded video
I had no problem streaming a video, but struggle to create a new media instance from an resource embedded in the shared project in a Xamarin Forms App. We tried many different things to get the video running, but none worked. Therefore, I have the following two questions:
- How can I get the path to the shared ressource, so that the library can find it? What Fromtype should I (ex. FromType.FromLocation)?
- If this is not possible, how can I get the correct path to play a resource embedded in a native project and play it in the shared project? (can not use android.resource://.. since MEdia will add suffix File://)
Here is where the file lays within the shared project:
Here is where the file lays within the android project:
Here are is the code:
Possible Fix: I think the main problem is, that I might use a wrong path.
Thanks in advance and sorry for the struggle :)