Android:MediPlayer类的代理设置

问题描述

| 我正在开发一个android应用程序。在此应用程序中,我必须从HTTP服务器播放视频。我正在尝试使用MediaPlayer类播放此HTTP视频流。我正在接收 \“无法播放视频\”错误。 我的WI-FI连接需要代理才能访问Internet。如何指定这些代理设置。     

解决方法

        你可以试试:
Properties systemSettings=System.getProperties();

systemSettings.put(\"http.proxyHost\",\"your.proxy.host.here\");
systemSettings.put(\"http.proxyPort\",\"8080\"); // use actual proxy port
但是,请记住,“无法播放视频”有许多潜在原因。在Eclipse中使用
adb logcat
,DDMS或DDMS透视图检查LogCat,并查看
MediaPlayer
生成的警告或错误,以提供更多线索。例如,您的视频可能不是“可以安全流式传输”。