Hi,
I wana to develop android app that will play rtsp link from local
server, but the screen goes blank....
I had tried both VideoView and mPlayer classes.
Below is my code
public class WifiManagerActivity extends Activity {
private WifiManager customWifiManager;
private VideoView mu;
// private String path;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
wifiSettings();
}
private void wifiSettings() {
mu = (VideoView) findViewById(R.id.ttl);
TextView notify = (TextView) findViewById(R.id.wifi_state);
customWifiManager = (WifiManager)
getSystemService(Context.WIFI_SERVICE);
// URL url = new URL(path);
// URLConnection connect = url.openConnection();
// InputStream read8 = connect.getInputStream();
if(customWifiManager.isWifiEnabled()){
Toast.makeText(this, "Your wifi is On now enjoy " +
"live streaming",
Toast.LENGTH_SHORT).show();
notify.setTextColor(Color.GREEN);
showVideo();
}else{
Toast.makeText(this, "Turn your Wifi On",
Toast.LENGTH_SHORT).show();
customWifiManager.setWifiEnabled(true);
//two second wait here
showVideo();
}
}
private void showVideo() {
// String path = "http://webcam.oii.ox.ac.uk";
Authenticator.setDefault(new MyAuthenticater());
String path = "rtsp://192.168.1.155:554/3g";
mu.setVideoURI(Uri.parse(path));
// mu.setVideoPath(path);
mu.setMediaController(new MediaController(this));
mu.requestFocus();
mu.start();
}
}
Work well on youtube rtsp links with .3gp extension but not working on
the above URL.
Any help please
regards
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en