I am new to developing Android hybrids. I have embedded a Youtube video in an html page using
<object width="100%" height="auto" width="auto" type="text/html" data="http://www.youtube.com/embed/Q7DojKxaNxE">Unable to play video. <param name="movie" value="http://www.youtube.com/embed/AlSbZvK1O1Y"/> </object>
and this html page is loaded into webview. Now, when I try to play the video in a web browser application, follow these steps: error log
FATAL EXCEPTION: main java.lang.NullPointerException at android.webkit.HTML5VideoView.reprepareData(HTML5VideoView.java:352) at android.webkit.HTML5VideoViewProxy$VideoPlayer.play(HTML5VideoViewProxy.java:245) at android.webkit.HTML5VideoViewProxy.handleMessage(HTML5VideoViewProxy.java:447) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5317) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method)
I loaded the html page in web view as below,
this.mainWebView.loadUrl("file:///android_asset/html1/this-app.html");
I tested on samsung devices 4.4.2 samsung version.
Please help me.
Thanks in advance
peter source share