i created an small Asp.Net website on my local system that has only one page that embeds a flash player into the page which plays an online video stream.
I use an Android WebView to load that page to play that video stream.
Code is as follows:
WebView _webview;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
this._webview = new WebView(getApplicationContext());
WebSettings webSettings = this._webview.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setPluginsEnabled(true);
webSettings.setPluginState(WebSettings.PluginState.ON);
Bundle bundle = getIntent().getExtras();
String videoUrl = bundle.getString("videoUrl");
this._webview.loadUrl("http://ip/FlashLiveStreamPlayer/Default.aspx?url=" + videoUrl);
setContentView(this._webview);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
I am testing this on Motorola Xoom Tablet and Logitech Google TV. The WebView works fine on tablet and loads the html page which contains Flash object. But the Google TV device shows me that "Flash Not Installed" icon.
After some research, i found here that The Chrome browser present in google tv uses its own rendering engine based on chrome for linux. It has got its own flash player that just runs on chrome. But in other hand, webview's use webkit rendering engine which is the rendering engine that can be found on normal android phones. The rendering engine cannot access or use the other flash player that is specifically used in Chrome.
I tried installing Flash Player on google tv directly from Android Market (not from Google TV Maeket) but its not available for Google TV ... or i can say its not supported to install a Flash Player separately which can be used by flash contents inside a WebView in Google TV only ... but Flash Player can be installed separately on tablet and so the WebView on tablet/phones can use Flash contents. y is that??
I have been trying to play a live stream for many days. I first tried MediaPlayer to do so... but it does not play an rtsp: stream well... it actually hangs forever after a minute... we have checked that on Sony/Logitech TVs & Motorolla Xoom tablet .. but no luck at all. ... i posted it on SO and Google guys are looking into it... i hope they will at least come up with some alternative...if not a complete fix
Thats y i am trying to play the stream in an html page inside a flash player and showing the user that page inside a WebView... but it only works on tablet and not on Google TV...
any help is greatly appreciated.
Edit: Or you can tell me which Media Format is best supported by Google TV & other Android devices ... I know there are a list of Google TV Supported Formats .. but i want to know about the best & tested format in it that not only runs smoothly on Google TV but is also supported on phones & tablets.
"Google TV v2.0 does not support Flash or HTML5 Video currently in a WebView."
From this source: https://developers.google.com/tv/android/articles/moving_web_content_to_android