0

これには多くの質問と回答があることは承知していますが、すべてを調べましたが、解決策が見つかりませんでした。ほぼ2か月間、「申し訳ありませんが、このビデオを再生できません」という問題に何度も遭遇しています。

ここに私のxmlファイルがあります

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
 >

<VideoView
    android:id="@+id/booksanimation"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    />
</RelativeLayout>

これが私のコードです..

    getWindow().setFormat(PixelFormat.TRANSLUCENT);
    videoview = (VideoView) findViewById(R.id.booksanimation);
    videoview.setVideoURI(Uri.parse("android.resource://com.d4sys.sabaq/" + R.raw.booksanimation));
    videoview.setMediaController(new MediaController(this));
    videoview.requestFocus();
    videoview.start();

何が問題なのかわかりません。解像度の異なる別のビデオを配置すると、そのビデオは再生されますが、すべてのビデオが再生されるわけではありません.タブレットで再生しているビデオがある場合、小さなデバイスでは再生されません。問題?

4

1 に答える 1

1

ビデオフォーマットを確認しましたか?すべての形式が Android でネイティブにサポートされているわけではありません。前に同様の問題に直面し、最終的にすべての mov を mp4 に変更します。

http://developer.android.com/guide/appendix/media-formats.html

于 2012-10-25T08:54:32.527 に答える