novoda/no-player

What should be done if I want to use it inside live wallpaper?

AndroidDeveloperLB opened this issue · 5 comments

After all, it doesn't have views...
I want to put it and view it in various scaling methods, but for now I've found out only how to do it with the normal MediaPlayer, and it scales it by stretching, which isn't nice:
https://stackoverflow.com/q/50091878/878126

@AndroidDeveloperLB I'm sorry to hear that you are having issues using no-player to create a live wallpaper. So that we can help you as soon as possible can you please follow the issue template associated with this repo. If you can provide any links code where you use no-player for the wallpaper that would be especially helpful.

I don't use it yet. Before I use it, I want to know how to do it in a live wallpaper app.
If you want, here's the project (before using this library, as I wrote) :
https://github.com/AndroidDeveloperLB/MovieLiveWallpaper

Hi @AndroidDeveloperLB in order to use no-player you need to attach a NoPlayerView and then load the video you desire. We do not actively support doing this with a live wallpaper, it's somewhat of an edge case.

I'm unsure how you would do this using no-player without spending more time looking at the WallpaperService documentation. My guess is you would need to create a NoPlayerView that takes the SurfaceHolder created by the Wallpaper and then attaches the NoPlayerView to no-player and plays the video.

Well that's the problem with live wallpaper. It doesn't have a view.
Anyway, thanks.
Hopefully this clue will suffice.

Hi @AndroidDeveloperLB Your issue with Live Wallpaper interested me enough that I took some more time to take a look this evening. I tried implementing it with no-player with no luck. You really need to inflate a view and use that view to make it work. You can, but it might be a lot of work, to perform the measure and layout yourself of whatever view you want to use. This could be no-player for example.

Romain Guy, one of the devs who worked on the Live Wallpaper says in this
https://stackoverflow.com/a/5001076/3687239
that it isn't supported because it wasn't the intention but you can measure and layout your own view.

I wish you luck! I'll be closing this issue.