0

The company I work for is developing an android BS client, The web server is worked with PHP script. While click one button, the server will send UDP video stream to the client. But how the web browser show the video? wy thought is that develop an browser plug, the plug invoke the MediaPlayer library. that's right? Who can help me? thanks.

1 Answers1

0

First off, I believe Android does not natively support UDP streams (see this question). If, on the other hand, you need to open a video file in the media player which is encoded in one of the platform's supported formats, simply create an intent with the url to the video, and the right mime type of the video. Something like this should work;

Intent intent = new Intent(Intent.ACTION_VIEW)
intent.setDataAndType(Uri.parse(url), "video/mp4"); // URL to video, with the correct media type
startActivity(intent); 
Community
  • 1
  • 1
Jeshurun
  • 22,940
  • 6
  • 79
  • 92