我有一个问题,我试图在Android设备的视频视图中显示视频的示例。
当我开始活动时,在Log i中获得无内容提供者异常,在我等待5秒后,视频开始播放并记录getMetadata。
为什么会这样?
这是我试过的一个片段:
String videoUri = "https://archive.org/download/ksnn_compilation_master_the_internet/ksnn_compilation_master_the_internet_512kb.mp4";
uri = Uri.parse(videoUri);
videoFrame = (VideoView) findViewById(R.id.viewScreen);
videoFrame.setVideoURI(uri);
videoFrame.start();
06-16 16:31:18.167 26176-26176/com.example.testapp.videoapp W/MediaPlayer: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider: https://archive.org/download/ksnn_compilation_master_the_internet/ksnn_compilation_master_the_internet_512kb.mp4
06-16 16:31:35.106 26176-26176/com.example.testapp.videoapp D/MediaPlayer: getMetadata
06-16 16:31:35.293 26176-26204/com.example.testapp.videoapp W/MediaPlayer: info/warning (3, 0)