android html5<video> 视频播放
public class JavaScriptInterface {
private Activity activity;
public JavaScriptInterface(Activity activiy) {
this.activity = activiy;
}
public void startVideo(String videoAddress){
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(videoAddress), "video/3gpp"); // The Mime type can actually be determined from the file
activity.startActivity(intent);
}
}
2、
在你的html5中添加脚本
Video节点 添加 οnclick="video url"
在任意地点 添加
<script>
function playVideo(video){
window.JSInterface.startVideo(video);
}
</script>
转载自:http://hi.baidu.com/itxiaofan/item/dfa1d9e3b758e236585dd833