Giter VIP home page Giter VIP logo

dotnet-maui-videoplayer's People

Contributors

davidbritch avatar yurkinh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotnet-maui-videoplayer's Issues

Excpetion running on Windows 11

Android works great, but when I run via Windows I get this exception:

protected override FrameworkElement CreatePlatformView() => throw new PlatformNotSupportedException("No MediaElement control on Windows.");

How to play selected video from a library (folder)?

Hello:
I am new to .NET MAUI, and I found your repo, it looks good.
But I have a question, I want to know if I can use some WinForm GUI toolbox control, like checkListBox or similar item in MAUI, so I can pick up or mark specific video from a list of videos.
For example: I have a total 10 videos in one folder: [D:\Videos], their names like:
1.mp4, 2.mp4, 3.mp4, 4.mp4, 5.mp4, 6.mp4, 7.mp4, 8.mp4, 9.mp4 and 10.mp4.
I want to be able to play those video one after another, like: play 1.mp4 first, 2.mp4 second, etc… until play 10.mp4 last.
For VLC media player, you can open a folder, so the media player will play all the videos inside that folder, you don’t have to manually play next one, after the current video playing is finished.
First, I want to know if I can write some code, just like VLC media player, so I can play all the videos inside one folder, so I don’t have to manually play next one?
If yes, please show me some code or some idea on how to do this.
Second, as I have multiple videos from different sources, but some of them are duplicate, for example, inside those 10 videos, I found 1.mp4 and 10.mp4 are actually the same video, therefore, I want to have some kind of mark to indication that they are duplicate, then later on, I can use C# code to delete all the duplicates, and keep only the first one?
If I can have some WinForm app toolbox control, like checkListBox, and indicate each video name in the all play list, then later on, I can use C# code to select all those items inside checkListBox, and delete all the duplicates and keep only the first video.
Since I don’t know much about .NET MAUI, I want to know what kind of controls can be used in .NET MAUI to work like checkListBox in Winform project.
Please advise,
Thanks,

Cannot use custom slider on Android

Summary

I tried your code on our project and custom slider not works on Android(works on windows) even in your own sample :((((( is there any workarounds for that?!

Btw, Thanks for your amazing sample you saved my day!

Video thumbnails on Android

I have noticed that the Controls on Android fades away after few seconds unless you tap on the Video whereas on iOS/Mac there's a fixed Play button at the centre of the Video with a thumbnail behind it.

Could there be a way to have either thumbnails for each Video or perhaps have Controls fixed without fading away as the end-user might think that there's no Video to play.
Screenshot 2022-09-13 at 12 08 51
Mine

"Can't play this video" error

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

  • Added all the files, edited csproj file, added MauiHandler to MauiProgram, added all native implementations, added Controls and Handlers folders etc.
  • Project builds successfully
  • I'm testing only on Android for now
  • Mp4 file is added to Raw folder as MauiAsset
  • I have tested getting the file from code using FileSystem.OpenAppPackageFileAsync, it works.

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:

[VideoView] Unable to open content: content://com.mobileapp/splashvideo.mp4
[VideoView] java.io.IOException: setDataSource failed.: status=0x80000000
[VideoView] 	at android.media.MediaPlayer.nativeSetDataSource(Native Method)
[VideoView] 	at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1260)
[VideoView] 	at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1247)
[VideoView] 	at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1158)
[VideoView] 	at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1179)
[VideoView] 	at android.widget.VideoView.openVideo(VideoView.java:412)
[VideoView] 	at android.widget.VideoView.access$2200(VideoView.java:83)
[VideoView] 	at android.widget.VideoView$7.surfaceCreated(VideoView.java:694)
[VideoView] 	at android.view.SurfaceView.updateSurface(SurfaceView.java:1350)
[VideoView] 	at android.view.SurfaceView.lambda$new$1$SurfaceView(SurfaceView.java:254)
[VideoView] 	at android.view.SurfaceView$$ExternalSyntheticLambda2.onPreDraw(Unknown Source:2)
[VideoView] 	at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1112)
[VideoView] 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4171)
[VideoView] 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2893)
[VideoView] 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10445)
[VideoView] 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1108)
[VideoView] 	at android.view.Choreographer.doCallbacks(Choreographer.java:866)
[VideoView] 	at android.view.Choreographer.doFrame(Choreographer.java:797)
[VideoView] 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1092)
[VideoView] 	at android.os.Handler.handleCallback(Handler.java:938)
[VideoView] 	at android.os.Handler.dispatchMessage(Handler.java:99)
[VideoView] 	at android.os.Looper.loopOnce(Looper.java:226)
[VideoView] 	at android.os.Looper.loop(Looper.java:313)
[VideoView] 	at android.app.ActivityThread.main(ActivityThread.java:8663)
[VideoView] 	at java.lang.reflect.Method.invoke(Native Method)
[VideoView] 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
[VideoView] 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
[VideoView] Error: 1,0

Screenshot_20220901-153624

Do you have any idea what could've gone wrong?

Thanks

Chromecast?

Just a question. Is it expected that Chromecast will be possible with this one?

Why not on NuGet?

I tried pack it into a nuget package but it has some error, so I wonder when we will be able to see a nuget package.

iOS Safe Area for Controls

Good day

I was wondering if it's possible to push up a little bit the Controls away from bottom safe area as I have seen this to be a bit of a problem in a Shell structure that has Flyout and Tabs system.

I have tried Safe Area from iOS Platform Specifics but not effect whatsoever.

Simulator Screen Shot - iPhone 13 Pro Max - 2022-09-30 at 10 49 21

Android - "Can't play this video" error with Videos on Azure Blob Storage

Hello

I followed the previous issue regarding this error on Android however, mine is a little bit different in that the videos (.mp4 & .mov) were playing just fine when they were hosted along side my .Net Core MVC application.

I moved those videos to Azure Blob Storage without changing anything such as file names etc and yet the error pops up on Android and yet all the videos are loaded just fine on iOS and can play them.

Here is the strange thing, today I cloned this application and ran it just to confirm that it is working as expected on both iOS simulator and Android emulator and all was good. I changed the source of the Video to one of the Videos currently on Azure but it failed even on this project.

I can provide the links to those videos if anyone is willing to reproduce the issue with Android.

The type or namespace name 'MauiVideoPlayer' could not be found (are you missing a using directive or an assembly reference?)

So I'm having an issue with my project that I'm not sure how to solve. (I'm new to .net Maui)
I ported the code into my project, but I'm getting this error on my VideoHandler.MaciOS file:
The type or namespace name 'MauiVideoPlayer' could not be found (are you missing a using directive or an assembly reference?)

I'm missing something from your project, but I can't figure out what it is.
I added the following to my project file and it seems to work for all but the MaciOS files.
On your project it seems to default to "net7.0-maccatalyst", but on mine it defaults to "net7.0-iOS" for the VideoHandler.MaciOS.cs file, which is why I'm getting the error I think.

<ItemGroup Condition="$(TargetFramework.StartsWith('net7.0-android')) != true">
<Compile Remove="**\**\*.Android.cs" />
<None Include="**\**\*.Android.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net7.0-ios')) != true AND $(TargetFramework.StartsWith('net7.0-maccatalyst')) != true">
<Compile Remove="**\**\*.MaciOS.cs" />
<None Include="**\**\*.MaciOS.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.Contains('-windows')) != true ">
<Compile Remove="**\*.Windows.cs" />
<None Include="**\*.Windows.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>

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.