在seekTo()函数不会在VideoView工作 [英] the seekTo() function doesn't work in VideoView

查看:484
本文介绍了在seekTo()函数不会在VideoView工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个在我的应用程序的问题,我想用seekTo()函数VideoView是这样的:

There is a problem in my application,I want to use the seekTo() function with VideoView like this:

videoView.seekTo(time);
videoView.start();

它的工作原理以及在Android 2.2系统,但在安卓2.3或更高版本不工作... 有些身体会告诉我为什么?这困扰我薮天。

It works well in android 2.2,but doesn't work in android 2.3 or higher version... Some body will tell me why?It troubles me for serval days.

推荐答案

在以 seekTo()工作,该视频应该是在 PlaybackState

In order to seekTo() to work , the video should be in PlaybackState.

VideoView <一个href="http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android/2.3.3_r1/android/widget/VideoView.java#VideoView.isInPlaybackState%28%29"相对=nofollow>来源此处了解更多信息。

这篇关于在seekTo()函数不会在VideoView工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆