videoView进度条显示错误的时间

时间:2013-02-04 15:59:44

标签: android

问题是我的视频有8分钟,进度条只显示1,20分钟!

public class MainActivity extends Activity {

VideoView v;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

  v = (VideoView) findViewById(R.id.videoview);
  String url = "android.resource://"+getPackageName()+"/" + R.raw.gozosos;
  v.setVideoURI(Uri.parse(url));
  v.setMediaController(new MediaController(this));
  v.start();
  v.requestFocus();

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
}

}

1 个答案:

答案 0 :(得分:0)

我解决了将视频转换为3gp格式的问题。