Hi John, I don't understand the meaning of "video needs special handling". Is there a tutorial or some examples that work with youtube's videos?
Thanks! Best regards Daniele On 2 Feb, 10:40, John Purcell <jsp...@gmail.com> wrote: > Danielle, > > If you look at the src (android-3.2.2_r2 is what I'm looking at), it's > crashing in the custom view. Unless you've implemented the code I > mentioned before, this will be the case. > > John > > On Jan 31, 3:42 pm, drenda <daniele.re...@gmail.com> wrote: > > > > > > > > > Hi John, > > thanks for your replay. > > I'm usign Honeycomb on a tablet. > > Unfortunally the order of the loading url don't resolve the problem. > > I'm try with this code: > > > setContentView(R.layout.video); > > final WebView webView = (WebView) findViewById(R.id.video_webview); > > webView.getSettings().setJavaScriptEnabled(true); > > webView.getSettings().setPluginsEnabled(true); > > webView.loadUrl(getString(R.string.urlYouTube)); > > > You can test this simple code with some video on youtube and you > > realize that you can see the preview image of the video but when you > > click on play button the video don't start!! Moreover if you click on > > maximise icon of the video the application crash as you can see here: > > > 01-31 20:41:24.778: E/AndroidRuntime(399): FATAL EXCEPTION: main > > 01-31 20:41:24.778: E/AndroidRuntime(399): > > java.lang.NullPointerException > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > android.webkit.HTML5VideoFullScreen.enterFullScreenVideoState(HTML5VideoFul > > lScreen.java: > > 253) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > android.webkit.HTML5VideoViewProxy > > $VideoPlayer.enterFullScreenVideo(HTML5VideoViewProxy.java:161) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > android.webkit.HTML5VideoViewProxy.enterFullScreenVideo(HTML5VideoViewProxy > > .java: > > 667) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at android.webkit.WebView > > $PrivateHandler.handleMessage(WebView.java:8017) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > android.os.Handler.dispatchMessage(Handler.java:99) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > android.os.Looper.loop(Looper.java:132) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > android.app.ActivityThread.main(ActivityThread.java:4123) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > java.lang.reflect.Method.invokeNative(Native Method) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > java.lang.reflect.Method.invoke(Method.java:491) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > com.android.internal.os.ZygoteInit > > $MethodAndArgsCaller.run(ZygoteInit.java:841) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599) > > 01-31 20:41:24.778: E/AndroidRuntime(399): at > > dalvik.system.NativeStart.main(Native Method) > > > Thanks very much > > > Best regards > > > Daniele > > > On Jan 31, 1:02 pm, John Purcell <jsp...@gmail.com> wrote: > > > > In general, the loading of the URL should come last (right now you've > > > got plugins and Javascript enabled messages being sent to the webcore > > > after you send a url request). > > > > Is this on Honeycomb or ICS? (I'm guessing ICS due to the 'normal' > > > errors you posted above). Keep in mind that video needs special > > > handling in older versions of android (well, in all versions > > > really).http://code.google.com/p/html5webview/willworkfor 2.x, but is out > > > of date for 3.x/4.x > > > > On Jan 30, 3:34 pm, drenda <daniele.re...@gmail.com> wrote: > > > > > PLease, > > > > someone has some ideas? > > > > > Thanks! > > > > > On 29 Gen, 22:38, drenda <daniele.re...@gmail.com> wrote: > > > > > > Hi, > > > > > i made a simple example in order to display in my app some youtube's > > > > > video of a playlist. > > > > > I created a WebView: > > > > > > @Override > > > > > public void onCreate(Bundle savedInstanceState) { > > > > > super.onCreate(savedInstanceState); > > > > > try { > > > > > setContentView(R.layout.video); > > > > > > final WebView webView = (WebView) > > > > > findViewById(R.id.video_webview); > > > > > > > > > > webView.loadUrl(getString(R.string.urlYouTube)); > > > > > > > > > > webView.getSettings().setJavaScriptEnabled(true); > > > > > webView.getSettings().setPluginsEnabled(true); > > > > > > } catch (Exception e) { > > > > > Log.e("Rubner", e.getMessage()); > > > > > e.printStackTrace(); > > > > > } > > > > > > The webview is render correctly and display the videos of playlist. > > > > > When you click on a video is displayed the page of the video with play > > > > > button but if you click on it the video don't start!!! > > > > > > Are raised these errors: > > > > > > 01-29 22:37:28.714: W/System.err(5963): Error reading from ./org/ > > > > > apache/harmony/luni/internal/net/www/protocol/data/Handler.class > > > > > 01-29 22:37:28.934: E/libEGL(5963): call to OpenGL ES API with no > > > > > current context (logged once per thread) > > > > > 01-29 22:37:28.934: D/ShaderProgram(5963): couldn't load the vertex > > > > > shader! > > > > > > Any ideas of the problem?? > > > > > > Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en