내 응용 프로그램에서 일부 비디오 mp4 파일을로드하고 타블렛 및 기타 안드로이드 장치에서 재생되지만 불에 같은 비디오를 재생하려고 할 때 응용 프로그램이 충돌합니다. 어떤 제안을하시기 바랍니다. 내 코드Kindle에서 비디오가 재생되지 않습니다. 응용 프로그램 충돌 안드로이드
public class VideoPlayer extends Activity {
private VideoView vidPlayer;
private ImageView ivPlayerBG;
private MediaController mc;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.videoplayer);
Utils.setOrientation(this);
vidPlayer = (VideoView) findViewById(R.id.vidPlayer);
ivPlayerBG = (ImageView) findViewById(R.id.ivPlayerBG);
mc = new MediaController(this);
vidPlayer.setMediaController(mc);
vidPlayer.setFocusable(true);
mc.show(0);
//onControllerHide();
AudioManager audioMan = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
if (audioMan.getStreamVolume(AudioManager.STREAM_MUSIC) <= 0) {
Toast.makeText(this, "volume is set to mute", Toast.LENGTH_LONG)
.show();
}
Log.v("totla memory play", "" + Runtime.getRuntime().totalMemory());
Log.v("HEAP_SIZE ", "" + Debug.getNativeHeapAllocatedSize());
Boolean isAudio = getIntent().getExtras().getBoolean("audio");
if (null != isAudio && isAudio) {
ivPlayerBG.setBackgroundResource(R.drawable.ic_launcher);
}
Uri videoUrl = Uri.parse(Utils.getSDCardPath(getIntent().getExtras()
.getString("url"))); // Uri.parse(Utils.getSDCardPath("Media/video.mp4"));
Log.v("log" + videoUrl.getPath(), "logv");
playVideo(videoUrl);
}
public void onControllerHide() {
mc.hide();
}
public void playVideo(Uri videouri) {
try {
vidPlayer.setVideoURI(videouri);
vidPlayer.requestFocus();
vidPlayer.start();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
protected void onDestroy() {
super.onDestroy();
}
}
내 장치가 뿌리 내리고 안드로이드 애플 리케이션을 오래 설치했습니다 ... whre 내가 플레이어를 얻을 것이라고 – cavallo
Daroon의 웹 사이트에서 얻을 것이다. http://www.androidzoom.com/android_applications/media_and_video/daroon-player_bdqdv.html –
https://play.google.com/store/apps/details?id=com.daroonplayer.dsplayer&feature=search_result –