2013-04-21 40 views
0

我現在正在做兒童ABC歌曲,我在我的數據庫中註冊了YouTube鏈接(例如:lUJpRSLQ2kg),並使用PHP將視頻重試爲「videolist.php 「我把它放在WebView Activity中,然後當用戶在Android WebView Activity中用戶執行超鏈接點擊YouTube視頻ID時,我需要播放視頻播放器活動。如何在WebView中按視頻鏈接時按下視頻播放器

video_list.php中的WebView(上市僅Youtube鏈接ID唯一的例子:7mOQb3E8ob0這樣http://www.youtube.com/watch?v=7mOQb3E8ob0不完全鏈接)

<a href=\"kidabcsong://MediaPlayer_Activity/vid=<?=$sqlVideoResultList['fileurl']?>\"> 
<img src=\"<?=$sqlVideoResultList['imageurl']?>\"> 
</a> 

我的問題是:如何使視頻播放器活動得到的WebView視頻ID並玩?

非常感謝您的幫助。

回答

0

您可以使用YouTube播放器,首先,註冊,領取編號,然後

Intent intent = YouTubeStandalonePlayer.createVideoIntent(args); 
startActivity(intent);