开发者

not able to play video in the emulator

public class VideoViewActivity extends Activity {
    private String vSource;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);

              setContentView(R.layout.videoviewacti);
              VideoView vView = (VideoView)findViewById(R.id.videovw);
              vView.requestFocus();
              String LINK = ConstantData.urlVideo;
              Log.i("path of video",""+LINK);
              vView.setVideoURI(Uri.parse(LINK));

              //vView.setVideoPath("sdcard/test30fps.mp4");
              MediaController mediacontroller = new MediaController(this);
              vView.setMediaController(mediacontroller);
              vView.start();
    }
}

here the video doesn't play开发者_运维技巧 in the emulator.It shows the error like "Can not play video" video format is mp4 on the webservice. when it opens the video file then the controls of the mediaplayer get disabled.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜