[問題] 使用vedioview 播放youtube影片

看板AndroidDev作者 (瘋子)時間13年前 (2012/11/08 11:46), 編輯推噓0(003)
留言3則, 3人參與, 最新討論串1/1
VideoView vv = (VideoView) findViewById(R.id.videoView1); MediaController mc=new MediaController(this); mc.setEnabled(true); mc.show(0); vv.setMediaController(mc); vv.setVideoURI(Uri.parse("http://youtu.be/lZ78JpU2wms"));
vv.requestFocus(); vv.showContextMenu(); vv.start(); run的時候會出現無法撥放影片,那是什麼原因 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 1.162.21.194

11/08 11:48, , 1F
你塞一個網頁給 videoplayer 當然不會撥阿
11/08 11:48, 1F

11/08 12:01, , 2F
不然用這個video物件 要怎串聯網頁影音
11/08 12:01, 2F

11/08 14:26, , 3F
是不是有youtube api可以用?
11/08 14:26, 3F
文章代碼(AID): #1GcoiVie (AndroidDev)