0

问题是我的视频有 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;
}

}

4

1 回答 1

0

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

于 2013-02-05T18:07:54.573 回答