Last active
June 21, 2018 08:31
-
-
Save nkenna/592876b09accaa4c773baf215233d750 to your computer and use it in GitHub Desktop.
Code snippet on webview video streaming
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private WebView webSurface; | |
String vidAddress = "http://192.168.43.25/view"; | |
........ | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
.......... | |
webSurface = (WebView) findViewById(R.id.webView); | |
webSurface.setWebChromeClient(new WebChromeClient()); | |
webSurface.getSettings().setPluginState(WebSettings.PluginState.ON_DEMAND); | |
webSurface.getSettings().setJavaScriptEnabled(true); | |
webSurface.loadUrl(vidAddress); | |
............. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment