I'm trying to play a video from my WebView, I've solved it... well sort of, but there is one problem. As for now, I've added an image with an onclick function named "playVideo"
public void playVideo(View V)
{
String LINK = "*URL TO VIDEO*";
setContentView(R.layout.video_activity);
VideoView videoView = (VideoView) findViewById(R.id.video);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
mc.setMediaPlayer(videoView);
Uri video = Uri.parse(LINK);
videoView.setMediaController(mc);
videoView.setVideoURI(video);
videoView.start();
}
When you press it, it opens up an activity with a "VideoView".
The problem:
I'm loading the video from a server and there will be new videos that will be uploaded and I would like to implement support for videos beeing played (run the "playVideo"-method) straight from the webpage that the webview shows.
Hope you understand what I mean.
Basicly; I want to click the < video >-tag (html5) open up video_activity and play video.