0
即時通訊試圖在Android應用程序的VideoView中播放視頻。 問題是我如何從youtube獲取正確的鏈接,而不僅僅是網頁?如何獲取正確的URL到視頻
setContentView(R.layout.videopopup);
VideoView vv = (VideoView)findViewById(R.id.videoElem);
MediaController mc = new MediaController(this);
mc.setEnabled(true);
mc.show(0);
vv.setMediaController(mc);
vv.setVideoURI(Uri.parse("http://www.youtube.com/v/oFL2rszPmmU?version=3&feature=player_detailpage"));
vv.requestFocus();
vv.showContextMenu();
vv.start();
在這個環節
:Video View not playing youtube video
葉夫根Nacu解釋了哪些鏈接是應該的,但不知道如何從給定的YouTube頁面檢索它。
檢查此鏈接http://keyeslabs.com/joomla/blogs/i-think-im-becoming-an-android/ 51-polish-your-app-free-embeddable-android-youtube-activity – vrs
https://developers.google.com/youtube/2.0/developers_guide_protocol_audience – vrs