在 Android 上通过 rtsp 进行流式传输
我正在尝试使用视频视图播放 rtsp 视频,它运行良好,可以播放视频,但我遇到了一些问题:
它没有缓冲视频,例如我观看了视频 2 分钟,现在我想再从一分钟前开始播放。我使用滑块返回到 1 分钟,但当我这样做时,它会再次重新缓冲视频。
当视频播放完成时,它每次都会抛出 error-48,而不是调用
onCompletion
。
这是我播放视频的代码:
String videoPath = "rtsp url";
mVideoView.setVideoURI(Uri.parse(videoPath));
mVideoView.requestFocus();
mVideoView.start();
请建议我应该做什么来避免/解决这些问题。
I am trying to play a rtsp video using a video view, it works well, play the video but there are problems which i am facing:
It is not buffering the video, e.g. i watched the video for 2 mins and now i want to play it from one minute back again. I used the slider for going back to 1 min but when i do this it re buffers the video again.
When the video playback is completed it throws an error-48 every time in stead of calling
onCompletion
.
Here is my code for playing the video:
String videoPath = "rtsp url";
mVideoView.setVideoURI(Uri.parse(videoPath));
mVideoView.requestFocus();
mVideoView.start();
Please suggest, what should i do to avoid/resolve these problems.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)