Android video as a live wallpaper

前端 未结 4 901
野趣味
野趣味 2020-12-13 23:00

i am trying to put video as a live wallpaper. I am using media player for that. i can get SurfaceHolder and i can give that holder to the media player. But its not working f

4条回答
  •  旧时难觅i
    2020-12-13 23:48

    Instead of using **mediaPlayer.setDisplay(surfaceHolder)** you can use **mediaPlayer.setSurface(surfaceHolder.getSurface())**..

    It will not give any kind of conflicts with the attribute KeepScreenOn.

    NJOY.. :)

提交回复
热议问题