How to display Video in the Android Emulator from Remote URL?

前端 未结 3 1077
花落未央
花落未央 2020-12-05 17:05

I am using the following code to display a video file in the android emulator,it works fine when the video file is stored in a SDcard.But when i give any URL of a video the

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-05 17:33

    You should also use the prepareAsync() method instead of prepare(). Using prepare() is a blocking call (UI gets locked), while prepareAsync is not a blocking call.

提交回复
热议问题