Open andrijac opened 2 years ago
Im also experiencing the same issue especially when Videos are loaded using CollectionView, the error message show up lets say 3 times if the CollectionView has 3 Videos. Please provide a solution regarding this.
Hi @andrijac
You added it to the Resources/Raw project in your single project?
@andrijac It's also worth checking your .csproj file that the entries for the video(s) look like:
<ItemGroup>
<None Remove="Resources\Raw\AndroidVideo.mp4" />
<None Remove="Resources\Raw\AppleVideo.mp4" />
<None Remove="Resources\Raw\WindowsVideo.mp4" />
</ItemGroup>
I've had cases where VS produces incorrect .csproj entries (it can do a remove and an include, which is wrong).
Is your bundle id definitely com.mobileapp
i.e. two parts to it rather than three?
I still get same message :(
I cleaned project before running it again.
Where did you change the bundle id?
I tried reading the file my main page:
var stream = await FileSystem.OpenAppPackageFileAsync("splashvideo.mp4");
byte[] m_Bytes = ReadToEnd(stream);
await this.screenNotificationService.NotifyInfo(this.logger, m_Bytes.Length.ToString());`
it worked.
Changed in AndroidManifest and in VideoProvider.cs in Android platform folder.
What should be format of string in VideoProvider.cs? Does it has to contain Project name? E.g.: com.mobileapp.ProjectName?
You also need to update it in your .csproj: https://github.com/davidbritch/dotnet-maui-videoplayer/blob/a874e5673c6ebc1894441c35773b52727a81098a/src/VideoDemos/VideoDemos.csproj#L18
I got the same error, how did you solve it. I update ApplicationId for my projectname and added Resources/Raw path.it looks something like this:
<ApplicationId>com.companyname.mauiclient</ApplicationId>
<ApplicationIdGuid>9a2c7080-db10-4f4a-b1e8-a5af8c8236a3</ApplicationIdGuid>
<ItemGroup>
<None Remove="Resources\Raw\1.mp4" />
</ItemGroup>
but it still doesn't work, please tell me how to fix it.
I got the same error, how did you solve it. I update ApplicationId for my projectname and added Resources/Raw path.it looks something like this:
<ApplicationId>com.companyname.mauiclient</ApplicationId> <ApplicationIdGuid>9a2c7080-db10-4f4a-b1e8-a5af8c8236a3</ApplicationIdGuid> <ItemGroup> <None Remove="Resources\Raw\1.mp4" /> </ItemGroup>
but it still doesn't work, please tell me how to fix it.
I didn't solve it, I gave up :) Lucky, project got canceled. We moved back to Flutter, for now.
@andrijac It’s sad that to see you going because of a simple issue that could easily be attended to by @davidbritch
I solved the problem, in Platforms\Android\VideoProvider.cs file, ContentProvider Attribute value is com.companyname.projectname?
look this :[ContentProvider(new string[] { "com.companyname.mauiclient" })]
@andrijac It’s sad that to see you going because of a simple issue that could easily be attended to by @davidbritch
It is sad that MAUI didn't had this implemented in version 1. Respect to @davidbritch for trying to solve it.
@andrijac I agree that @davidbritch did a fantastic job with his implementation, its just that the MediaElement is 'slowly' progressing but I personally wanted to expose this incredible work that is already done by @davidbritch for the simplicity of addressing a specific needs that developers have.
Can I kindly share about 3 links of simple videos uploaded on my Azure Blob Storage using this project to check why there's error of 'Can't play this video' only on Android.
First of all, thanks for doing this, great project. It is amazing that MS didn't implement Video player themselves.
I'm trying to implement your example into my project. I have mp4 file that I used in your example to try to play it as a resource file in Raw folder, it works.
I have added all the file in my project
When I try to play the file in my project, it displays dialog with message: "Can't play this video".
From output I'm getting:
Do you have any idea what could've gone wrong?
Thanks