How to catch “Sorry, This video cannot be played” error on VideoView

后端 未结 4 2032
执念已碎
执念已碎 2021-01-01 08:49

I have a VideoView and I am streaming videos from a remote server. Most of the times It would play the videos very smoothly. But sometimes, it displays an error message \"So

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-01 09:30

    Try using setOnErrorListener: the documentation says If no listener is specified, or if the listener returned false, VideoView will inform the user of any errors., so I'm assuming if you set one and return true it will not show the user error.

提交回复
热议问题