我有一个使用视频视图显示直播的应用。它适用于我的Galaxy S4设备,但它不适用于旧设备或其他4.0+设备。 我得到一个弹出警告说:不能播放视频。对不起,此视频无法播放
我正在使用HTTP网址转到流媒体页面。
MediaController mediacontroller = new MediaController(parentActivity);
mediacontroller.setAnchorView(videoView);
// Get the URL from String VideoURL
Uri video = Uri.parse(auction.getVideoUrl());//"http://..../playlist.m3u8");
videoView.setMediaController(mediacontroller);
videoView.setVideoURI(video);
//videoView.requestFocus();
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener()
{
// Close the progress bar and play the video
public void onPrepared(MediaPlayer mp)
{
GEMLog.i(TAG, "video ready to be played " + auction.getVideoUrl());
Log.i(TAG, "video ready to be played " + auction.getVideoUrl());
videoView.start();
if (delegate != null)
{
delegate.videoReady();
}
}
});
为什么会发生这种情况?