Why not all mp4 videos played on Android device?

◇◆丶佛笑我妖孽 提交于 2019-12-13 03:25:40

问题


I tried to play the following two urls by video view on Android device, the first one has worked fine but the second one is not working. the second one may needs ssl certificate but i don't know how to play it the error code appears when I am trying to play it is :

 E/MediaPlayer error (1, -4)

I checked a link that mentioned list of error codes and it said that error(1,-4) means NotSupportedFormat. So why this error doesn't appear in the first link although both videos links are .mp4

The first working link :

 http://i250.photobucket.com/download-albums/gg264/APT08/APTAd3.mp4 

The second not working link :

  http://*********/xxxxxxxxxxxxxxxxxxxxx.mp4
  https://**********/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.mp4

Note1: I asked a question related to this it helps to play the first link but the second still not working on android device

Note2: I am using the following code to play both links:

  VideoView myVideo = (VideoView) findViewById(R.id.videoView1);
         myVideo.setVideoPath("https://*********/bbbbbbbbbbbbbbbbbbb.mp4");
//       myVideo.setVideoURI(Uri.parse("https://*************/bbbbbbbbbbbbbbbbbbbbbbbbb0.mp4"));
    MediaController mc = new MediaController(this);
    mc.setMediaPlayer(myVideo);
    myVideo.setMediaController(mc);
    myVideo.requestFocus();
    mc.show();

回答1:


we dont have https playback support for android 3.0 - only from 3.0 and above refer http://developer.android.com/guide/appendix/media-formats.html



来源:https://stackoverflow.com/questions/12156358/why-not-all-mp4-videos-played-on-android-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!