How to upload a video on a screen?

1

I'm doing an application in Android Studio where I have the main screen (MainActivity) that has a menu with several links and one of them calls a Fragment (VideoFragment) where when loaded should show a video (youtube and local) with description someone Can you give me a hand? Thank you for your attention.

    
asked by anonymous 14.07.2016 / 17:04

1 answer

0

You can use a webview, for example:

WebView myWebView = (WebView) findViewById( R.id.webview_compontent );

String playVideo= "<html><body>Youtube video .. <br> <iframe class=\"youtube-player\" type=\"text/html\" width=\"640\" height=\"385\" src=\"http://www.youtube.com/embed/bIPcobKMB94\" frameborder=\"0\"></body></html>"

myWebView.loadData(playVideo, "text/html", "utf-8");

Hugs.

    
14.07.2016 / 18:36