Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我从 web 视图连接到 youtube 视频页面。我可以从这里获取视频的 rtsp 链接,我想在本机媒体播放器中打开它。但这里的问题是:我想在用户想要播放视频时触发媒体播放器的打开,当他/她点击视频时。我怎么能听呢?
下面的代码在本机媒体播放器中打开您的视频。
String url = "Rtsp Link"; Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(url,"video/*"); startActivity(intent);