textureview onSurfaceTextureAvailable never called inside relativelayout inside fragment

后端 未结 7 1435
走了就别回头了
走了就别回头了 2020-12-10 10:52

onSurfaceTextureAvailable in VideoView is never called...
I have this view that is holding the textureview.

public class MyMediaPlayer extends RelativeLa         


        
7条回答
  •  隐瞒了意图╮
    2020-12-10 11:31

    In my case I initially had my TextureView invisible and then loaded after fetching some data and this was causing onSurfaceTextureAvailable not to be called. I am guessing that for TextureView to be said to be 'available', it must be visible. My solution was to just make the TextureView visible from the start.

提交回复
热议问题