mhsc90 Posted February 14, 2013 Share Posted February 14, 2013 Bonjour j'essaye de lancer une video sur une tablette Galaxy Tab 2,cependant l'application se lance mais je n ai pas l'image, je n ai que le son. Donc j ai essayé de lancer l'application sur un telephone portable (galaxy S2), et la ca marche son et image (ma video est un mp4 avec les dimensions 1280x800). Voici mon code : import android.app.Activity;import android.net.Uri;import android.os.Bundle;import android.view.Window;import android.view.WindowManager;import android.widget.MediaController;import android.widget.VideoView;public class MainActivity extends Activity {@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);requestWindowFeature(window.FEATURE_NO_TITLE);setContentView(R.layout.activity_main);getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);//VideoView view = new VideoView(this);VideoView view = (VideoView)findViewById(R.id.view);//view.setMediaController(new MediaController(this));//setContentView(view);view.setVideoURI(Uri.parse("android.resource://"+this.getPackageName()+"/"+R.raw.video4));view.requestFocus();view.start();}} mon XML: <?xml version="1.0" encoding="utf-8"?> <VideoView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:id="@+id/view" android:layout_height="fill_parent" android:layout_alignParentRight="true" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_gravity="center"> </VideoView> voici mon logcat: 02-13 20:55:21.707: D/OpenGLRenderer(31903): Flushing caches (mode 1) 02-13 20:55:22.105: D/OpenGLRenderer(31903): Flushing caches (mode 0) 02-13 20:56:23.699: D/libEGL(31991): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so 02-13 20:56:23.707: D/libEGL(31991): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so 02-13 20:56:23.707: D/libEGL(31991): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so 02-13 20:56:23.902: D/OpenGLRenderer(31991): Enabling debug mode 0 02-13 20:56:23.933: I/MediaPlayer(31991): path is null 02-13 20:56:24.050: W/MediaPlayer(31991): info/warning (901, 0) 02-13 20:56:24.199: I/MediaPlayer(31991): Info (901,0) 02-13 20:56:24.199: E/MediaPlayer(31991): mOnInfoListener is null. Failed to send MEDIA_INFO message. 02-13 20:56:24.207: D/MediaPlayer(31991): getMetadata Voila j ai essayé en avi c'était pareil.... Je ne comprends pas du tout... Merci d'avance de votre aide. Bonne soirée Tom Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.