2013-05-07 82 views
3

我正在開發一個應用程序,我需要從SD卡播放視頻。我正在使用下面的代碼,並且在摩托羅拉2.3.3設備以外的所有設備上都能正常工作。摩托羅拉SD卡不播放視頻2.3.3

有些時候它播放10-15秒視頻然後黑屏來了,但有時它只顯示黑屏,它顯示視頻視圖底部的持續時間。

所以,請指導我..三江源

VideoView vv = (VideoView) this.findViewById(R.id.video_view); 
String filepath = "mnt/sdcard/my_video.mp4"; 
MediaController mc = new MediaController(this); 
mc.setAnchorView(vv); 
vv.setMediaController(mc); 
vv.requestFocus(); 
vv.start(); 
+1

任何錯誤日誌中logcat的?請檢查系統範圍的日誌,而不僅僅是您的應用程序包的日誌。 – 2013-05-07 10:01:19

+0

也許他的設備沒有所需的編解碼器? – Machinarius 2013-05-07 10:16:29

回答

0
if(play the same video using default player in gallery){ 

     //you are doing something wrong in ur code  

}else{ 

//this device has no capabilities to play the provided video with the default codes. 
//try to look for any installed app that can play the video for this devices 

}