如何在android上打開udp組播視頻流?在Android上打開udp組播視頻流
我試過這段代碼:
public class androidActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
VideoView videoView = (VideoView) findViewById(R.id.videoView);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
Uri video = Uri.parse("udp://224.1.1.1:1234");
videoView.setMediaController(mediaController);
videoView.setVideoURI(video);
videoView.start();
}
}
,但它不工作。
這是一個古老的問題,但你有沒有發現一個很好的方法來做到這一點在Android上? – 2016-08-31 09:20:34