如何在列表视图中选择时启用视频序列自动播放?
大家好,有人可以与我分享一下我如何编写我的 viewvideo.java 类,以便它允许自动播放视频功能,该功能自动排序在列表视图中播放所选视频的任务(从当前位置到最新录制的视频)按顺序直到最新的视频播放完毕)这类似于 YouTube 自动播放功能,如果你明白我的意思吗?
有人可以帮助我解决我现在面临的这个问题吗?我对 android/java 编程相当陌生,并且已经被这个问题困扰好几天了......抱歉我上面的英语不好......
Hello guys can someone share with me on how am i going to code my viewvideo.java class such that it allow auto-play video function which automatically sequence the task of playing the selected video in a listview (from current position to the latest video recorded in sequence until the latest video in line has finished playing) which is something similar to the youtube auto-play function if you know what i mean?
Can someone help me pertaining to this problem i'm facing now i'm rather quite new to android/java programming and have been stuck on this problem for days... Sorry for my bad English above..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您需要做的就是调用
videoView.setVideoPath(next_file_path)
,然后调用videoView.start()
。如果没有更多视频,则调用videoView.stopPlayback()
。以下是可能有效的方法:
这会将路径名数组传递给您的对话框活动(您尚未发布)。如果用户选择播放所有视频,您应该能够检索 arrayPath 并将其传递给 VideoView 活动。
I think that all you need to do is call
videoView.setVideoPath(next_file_path)
and then callvideoView.start()
. If there are no more videos, then callvideoView.stopPlayback()
.Here's something that might work:
This passes the array of path names to your DialogBox activity (which you haven't posted). You should then be able to retrieve
arrayPath
and pass it on to the VideoView activity if the user selects to play all videos.