video within webkit ?

All your problems with Audio, Video and Images.

video within webkit ?

Postby darolla » Thu Jun 24, 2010 9:22 pm


I made my own mobile webpage with a link to a video.

Using the Android default browser a touch onto this video link starts the video player (don't know if it's a plugin or an activity).

I build my own webkit showing the mobile webpage.

But touching the video link doesn't do anything.

So I googled and found setPluginsEnabled(true) which wasn't helpfull at all.

Right know I am using my own intent filter (manifest) and my own overridden WebViewClient.

The user is asked to choose between different activities in order to play the video. E.g. the default browser is suggested :(

But the behaviour right now destroys the illusion of a webapp.

Do you know how to get the same behaviour out of my webapp as the default browser does (a touch into the video link just plays the video)?

Here comes some code:

Code: Select all
    <application android:icon="@drawable/icon" android:label="@string/app_name">

        <activity android:name=".MyWebkitActivity" android:label="@string/app_name">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />

                <action android:name="android.intent.action.VIEW"></action>
                <category android:name="android.intent.category.DEFAULT"></category>
                <category android:name="android.intent.category.BROWSABLE"></category>
                <data android:host="streamserver" android:scheme="http"></data>


    private class MyWebViewClient extends WebViewClient {
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
//          view.loadUrl(url);
//          return true;
            if (url.startsWith("http://streamserver")){
                startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
                return true;
            } else {
                return false;

        webview = (WebView) findViewById(;
        webview.setWebViewClient(new MyDroidWebViewClient());

Best regards,
Marco Schmitz
User avatar
Master Developer
Master Developer
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany


Re: video within webkit ?

Postby androidandme » Fri Jul 09, 2010 7:17 am

Hi Marco,

Even I want to play Media / video using Android webkit browser from server.. can you pls. guide me on how to achieve this?
Posts: 2
Joined: Thu Jul 08, 2010 11:30 am


Return to Multimedia Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 3 guests