简体   繁体   English

在线mp4视频无法播放

[英]Online mp4 video is not playing

what's the problem there, I have uploaded this video to server, but now its not playing, but its playing if i put this video on sdcard which is commented 那里有什么问题,我已将该视频上传到服务器,但现在无法播放,但是如果我将此视频放在sdcard上,则该视频正在播放

public class VideoPlayerActivity extends Activity {
    /** Called when the activity is first created. */


        private MediaController mc;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        VideoView vd = (VideoView) findViewById(R.id.VideoView);

        mc = new MediaController(this);
        vd.setMediaController(mc);
Toast.makeText(this, "Video Player Started", 20).show();
          //vd.setVideoPath("sdcard/video/abc.mp4");
        vd.setVideoURI(Uri.parse("http://www.primesquad.com/future.mp4"));

        vd.start();
        }

        }

streaming video differ from playing it from sdCard as you see in Android Supported Media Formats there is restrictions for streaming that don't apply when playing video. 流视频不同于从sdCard播放视频,就像您在Android支持的媒体格式中看到的那样,流视频的限制在播放视频时不适用。 I faced this problem with videos stream normally in HTC Desire but refuse to stream with Motorola droid 我在HTC Desire中正常播放视频时遇到了这个问题,但是拒绝使用Motorola droid播放

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM