Hi,
I try to develop an very Simpel app. Just open some html files over a
WebView the files are located in the asset folder.
I want to play videos via HTML5. I have implemented with the following
code:

<video id="my_video_1" class="video-js vjs-default-skin" width="480"
height="320" poster="img/p.jpg" controls>
                <source src="movies/mymovie.mp4" type="video/mp4">
</video>

The movie is placed to in the assets folder under "movies"
It works, but the app say "video can not be played" and is in my log
files I get:
02-24 11:12:27.080: V/webview(4682):  singleCursorHandlerTouchEvent -
getEditableSupport  FASLE
02-24 11:12:27.680: I/MediaPlayer(4682): prepareAsync called in state
4
02-24 11:12:27.680: E/MediaPlayer(4682): error (1, -2147483648)
02-24 11:12:27.770: E/MediaPlayer(4682): Error (1,-2147483648)
02-24 11:12:29.770: V/webview(4682):  singleCursorHandlerTouchEvent -
getEditableSupport  FASLE

And i dont understand what is "E/MediaPlayer(4682): error (1,
-2147483648)"
I have found on http://android.joao.jp/2011/07/mediaplayer-errors.html
that the 1 in my error mean ERROR_NOT_CONNECTED but to what want the
Media Player connect?

Here is my code i have all needed classes imported:
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.getWindow().requestFeature(Window.FEATURE_PROGRESS);
        setContentView(R.layout.main);

        mWebView = (WebView) findViewById(R.id.webview);

            mWebView.getSettings().setJavaScriptEnabled(true);
            mWebView.getSettings().setAllowFileAccess(true);
            mWebView.getSettings().setPluginsEnabled(true);
            mWebView.getSettings().setSupportZoom(false);
            mWebView.getSettings().setAppCacheEnabled(false);
            mWebView.getSettings().setAllowContentAccess(true);
            mWebView.getSettings();
                mWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);

                mWebView.setWebChromeClient(new WebChromeClient() {
            public void onProgressChanged(WebView view, int progress){
                activity.setTitle("Loading...");
                activity.setProgress(progress * 100);

                if(progress == 100)
                    activity.setTitle(R.string.app_name);
            }
        });

                mWebView.setWebViewClient(new WebViewClient() {
            @Override
            public void onReceivedError(WebView view, int errorCode,
String description, String failingUrl){
                // Handle the error
            }

            @Override
            public boolean shouldOverrideUrlLoading(WebView view,
String url){
                view.loadUrl(url);
                return true;
            }
        });

                mWebView.loadUrl("file:///android_asset/site/index.html");
    }

Hope someone can help me with this.

-- 
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

Reply via email to