帮助文档

Help documentation

如何用 Vitamio 创建组播

Vitamio支持组播UDP协议, 我们建议您在构建组播时:先确保视频的地址有效,并且非加密以及嵌套的视频。当视频无法播放时,建议使用VPlayer 或者其他视频播放器测试,明确问题出在Vitamio时,请到社区提问!

VitamioDemo 参考代码

 

public class VideoViewDemo extends Activity {

private String path = "udp://236.1.0.1:2000";
private VideoView mVideoView;

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    if (!LibsChecker.checkVitamioLibs(this))
        return;
    setContentView(R.layout.videoview);
    mVideoView = (VideoView) findViewById(R.id.surface_view);

    if (path == "") {
        // Tell the user to provide a media file URL/path.
        Toast.makeText(VideoViewDemo.this, "Please edit VideoViewDemo Activity, and set path" + " variable to your media file URL/path", Toast.LENGTH_LONG).show();
        return;
    } else {
        mVideoView.setVideoURI(Uri.parse(path));
        mVideoView.setMediaController(new MediaController(this));
        mVideoView.requestFocus();

    }
}
}

 

© 2011-2013 Xuan Yi Xia Inc. All rights reserved