Issue
Hi I have a website that has a video player in it, and I want to play that video player insie of my android application. The video player plays great inside of the androids native browser, But when I direct a WebView to go to that same site with the player the video player doesn't show up, All the content around the player shows up. How do I get the video player to play inside of my applications webview?
Solution
Webview will not by default allow Javascript which is most likely what your video player is using on the website. You would most likely need to tell your Webview to use Javascript in order for it to at least try to play the video (I say try because I have never done this myself, I usually use a player activity for video).
So by referencing your activies webview object you can do this:
browser = (WebView) findViewById(R.id.webbrowser_wvViewer);
browser.getSettings().setJavaScriptEnabled(true);
Answered By - David Hirst
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.