【发布时间】:2016-11-20 14:17:16
【问题描述】:
使用毕加索,我能够在我的 Android 应用程序中非常快速地下载和显示我的图像。现在我想从我的 S3 服务器流式传输我的视频并通过我的应用程序播放它们,比我的代码更快:
try {
MediaController VideoController = new MediaController(VideoPlayerActivity.this);//Creates a media controller to this activity.
VideoController.setAnchorView(AdVideoView);//Adds the media controller to the video view.
Uri video = Uri.parse(VideoURL);//Creates a Uri to hold the URL of the video.
AdVideoView.setMediaController(VideoController);//Add the media controller to the video view.
AdVideoView.setVideoURI(video);//Make the video view play from the Uri.
} catch(Exception e) {
Log.e("Video Stream Error", e.getMessage());//Sets the message for the log.
e.printStackTrace();//Displays the error in the stack trace.
e.notify();
}
有没有更快的方法通过 GitHub 或更好的代码显示视频?
提前致谢!
【问题讨论】:
标签: android amazon-web-services video amazon-s3 android-videoview