android-developers
[Arriba] [Todas las Listas]

[android-developers] Re: Implementando onShowCustomView en Android 3.1 e

To: Android Developers <android-developers@xxxxxxxxxxxxxxxx>
Subject: [android-developers] Re: Implementando onShowCustomView en Android 3.1 echa en HTML5VideoFullScreen
From: novemberox <novemberox@xxxxxxxxx>
Date: Mon, 31 Oct 2011 03:58:02 -0700 (PDT)
Delivery-date: Mon, 31 Oct 2011 06:58:18 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:mime-version:date:in-reply-to:references:user-agent :x-http-useragent:message-id:subject:from:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type :content-transfer-encoding; bh=2Y8FWak6p2tjLUC2w+keqR0ora16+RbGzWKuBzfmkNc=; b=1vCC9+9nP1FZkckw7600ZuB6lx6tRYb9oqimXtXuHf3MmI5p3s/jqSe2ZpPYh63LiH CSwdblEDH5mG+P7GKrLPxJcLKqcSVKWyQSAaOd/7aMv1XtMa3xGw5bfq73gpXHw26rGm iaRyXfGSQPxhwL+sPdJdNAe6XOMZQSZXAIkCo=
Envelope-to: traductor@xxxxxxxxxxx
In-reply-to: <CAFv+5EcbRLrmZjPam5K3Vng91n4A9tyONE6HLzj39wYsf74Bng@mail.gmail.com>
List-archive: <http://groups.google.com/group/android-developers?hl=en_US>
List-help: <http://groups.google.com/support/?hl=en_US>, <mailto:android-developers+help@googlegroups.com>
List-id: <android-developers.googlegroups.com>
List-post: <http://groups.google.com/group/android-developers/post?hl=en_US>, <mailto:android-developers@googlegroups.com>
List-subscribe: <http://groups.google.com/group/android-developers/subscribe?hl=en_US>, <mailto:android-developers+subscribe@googlegroups.com>
List-unsubscribe: <http://groups.google.com/group/android-developers/subscribe?hl=en_US>, <mailto:android-developers+unsubscribe@googlegroups.com>
Mailing-list: list android-developers@xxxxxxxxxxxxxxxx; contact android-developers+owners@xxxxxxxxxxxxxxxx
References: <8fd4c8b2-e4b6-498d-83ad-e5815790c662@a27g2000yqc.googlegroups.com> <b24b484b-65fd-4213-8802-f1f9e820cd66@z7g2000vbp.googlegroups.com> <d4df8d58-db41-4a1a-b037-7900940b587a@h11g2000vbc.googlegroups.com> <CAAHOAAb3=H+a9hBe4JgnmZDHnTb+1z7yCdqWR6rHHX7N44s_Lw@mail.gmail.com> <CAFv+5EcbRLrmZjPam5K3Vng91n4A9tyONE6HLzj39wYsf74Bng@mail.gmail.com>
Reply-to: android-developers@xxxxxxxxxxxxxxxx
Sender: android-developers@xxxxxxxxxxxxxxxx
User-agent: G2/1.0
Para hacerlo te trabaja justo necesita a *override
*getVideoLoadingProgressView() en *WebChromeClient en *WebView

*i.*e.
@*Override
Vista pública *getVideoLoadingProgressView()
	#unknown{^*ProgressBar la barra = nueva *ProgressBar(Contexto);
	barra de regreso;
}

En 20 *Paź, 14:28, *M <*L novembe...@xxxxxxxxx> escribió:
> *Hi,
>
> nada nuevo en esto he también tema aquí:*http://*stackoverflow.*com/Cuestiona/7217159/implementando-*onshowcustomv...
>
> 2011/10/20 *luciofm <luci...@xxxxxxxxx>
>
>
>
>
>
>
>
> > *Hi *novemberox
>
> > Cualquier progreso en esto??? Soy habiendo el mismo asunto en un proyecto
>
> > Si no encuentro cualquier solución lo tendré que redirigir al *videoplayer
> > *via *Intent *unitl el código de fuente del ICS es liberado.
>
> > *Thanks
> > *Lúcio Maciel
> > luci...@xxxxxxxxx
>
> > En *Wed, *Aug 31, 2011 en 07:45, *novemberox <novembe...@xxxxxxxxx> escribió:
>
> >> yo también encontrado, aquel habilitando aceleración de hardware fija asunto con jugar
> >> *embedded vídeo. La Pantalla llena todavía no trabaja.
>
> >> En 29 *Sie, 21:34, *novemberox <novembe...@xxxxxxxxx> escribió:
> >> > Un consejo sería útil :)
>
> >> > intenté encontrar *Google fuentes de navegador en *Android 3.1, pero no soy
> >> > bastante seguro si fuentes aquí:
> >>*http://*android.*git.*kernel.*org/?*p=Paquetes/de plataforma/*apps/Navegador.*git;Un...
> >> > Es las fuentes utilizadas en 3.1.
>
> >> > En 27 *Sie, 22:28, *novemberox <novembe...@xxxxxxxxx> escribió:
>
> >> > > *Hi,
>
> >> > > estoy intentando jugar vídeo en *html en *fullscreen. Cuándo yo clic en
> >> > > *fullscreen botón en método de vídeo *onShowCustomView es disparado. Aquí es
> >> > > mi implementación:
>
> >> > >         público *void *onShowCustomView(vista de Vista, *CustomViewCallback
> >> *callback)
> >> > >                 #unknown{^*super.*onShowCustomView(Vista, *callback);
> >> > >                 si (vista *instanceof *FrameLayout)
> >> > >                         #unknown{^*customComponenet.*addView(Vista, nuevo
> >> *FrameLayout.*LayoutParams(
>
> >> *ViewGroup.*LayoutParams.LLENA_PADRE,
> >> > > *ViewGroup.*LayoutParams.LLENA_PADRE,
> >> > >                                         Gravedad.CENTRO));
> >> > >                         *customComponenet.*setVisibility(Vista.VISIBLE);
> >> > >                 }
> >> > >         }
> >> > > Dónde *customComponenet es *FrameLayout colocado arriba de mi actual
> >> > > *layout. *Wideo Está jugando bien, es *visibile y todo *seams para
> >> > > ser *ok pero echa:
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235): EXCEPCIÓN FATAL: principal
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):
> >> > > *java.*lang.*NullPointerException
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
>
> >> *android.*webkit.HTML5*VideoFullScreen.*switchProgressView(HTML5*VideoFullScreen
> >> .*java:
> >> > > 320)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *android.*webkit.HTML5*VideoView.*setPlayerBuffering(HTML5*VideoView.*java:
> >> > > 319)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *android.*webkit.HTML5*VideoView.Inicio(HTML5*VideoView.*java:85)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *android.*webkit.HTML5*VideoViewProxy
> >> > > $*VideoPlayer.*onPrepared(HTML5*VideoViewProxy.*java:257)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
>
> >> *android.*webkit.HTML5*VideoViewProxy.*onPrepared(HTML5*VideoViewProxy.*java:
> >> > > 278)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *android.*webkit.HTML5*VideoView.*onPrepared(HTML5*VideoView.*java:265)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
>
> >> *android.*webkit.HTML5*VideoFullScreen.*onPrepared(HTML5*VideoFullScreen.*java:
> >> > > 164)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *android.*media.*MediaPlayer$*EventHandler.*handleMessage(*MediaPlayer.*java:
> >> > > 1456)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *android.*os.*Handler.*dispatchMessage(*Handler.*java:99)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *android.*os.*Looper.Bucle(*Looper.*java:132)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *android.*app.*ActivityThread.Principal(*ActivityThread.*java:4028)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *java.*lang.Refleja.Método.*invokeNative(Método nativo)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *java.*lang.Refleja.Método.Invoca(Método.*java:491)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *com.*android.Interno.*os.*ZygoteInit
> >> > > $*MethodAndArgsCaller.Carrera(*ZygoteInit.*java:844)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *com.*android.Interno.*os.*ZygoteInit.Principal(*ZygoteInit.*java:602)
> >> > > 08-27 22:16:07.520: ERROR/*AndroidRuntime(7235):     en
> >> > > *dalvik.Sistema.*NativeStart.Principal(Método Nativo)
>
> >> > > Qué soy yo haciendo mal?
>
> >> > > Mi *WebView *settings:
> >> > >         *webView.*getSettings().*setJavaScriptEnabled(Cierto);
> >> > >         *webView.*getSettings().*setPluginState(*PluginState.ENCIMA);
> >> > >         *webView.*getSettings().*setDomStorageEnabled(Cierto);
> >> > >         *webView.*getSettings().*setDatabasePath("/Dato/de dato/" +
> >> > > *App.Clase.*getPackage().*getName() + "/*databases");
> >> > >         *webView.*getSettings().*setSupportZoom(Falso);
>
> >> > > estoy probando en Galaxia *Tab 10.1, en *default navegador esto está trabajando
> >> > > justo bien. Puedo cambiar a *fullscreen. Además en mi *app cuándo juego
> >> > > vídeo *embeded puedo oír sonido único y ver barra de estado abajo área
> >> > > donde el vídeo tendría que ser, mientras en navegador puedo ver vídeo tanto *embeded
> >> > > en *WebView y en *fullscreen.
>
> >> --
> >> Recibiste este mensaje porque eres *subscribed al *Google
> >> Grupos "*Android *Developers" grupo.
> >> A correo a este grupo, envía *email a *android-developers@xxxxxxxxxxxxxxxx
> >> A *unsubscribe de este grupo, envía *email a *android-*developers+unsubscribe@xxxxxxxxxxxxxxxx
> >> 
> >> Puesto que más opciones, visita este grupo en
> >>*http://grupos.*google.*com/Grupo/*android-*developers?*hl=*en

-- 
Recibiste este mensaje porque eres *subscribed al *Google
Grupos "*Android *Developers" grupo.
A correo a este grupo, envía *email a *android-developers@xxxxxxxxxxxxxxxx
A *unsubscribe de este grupo, envía *email a *android-*developers+unsubscribe@xxxxxxxxxxxxxxxx

Puesto que más opciones, visita este grupo en
*http://grupos.*google.*com/Grupo/*android-*developers?*hl=*en

To make it work you just need to override
getVideoLoadingProgressView() in WebChromeClient in WebView

i.e.
@Override
public View getVideoLoadingProgressView() {
	ProgressBar bar = new ProgressBar(Context);
	return bar;
}

On 20 Paź, 14:28, M L <novembe...@xxxxxxxxx> wrote:
> Hi,
>
> nothing new on this I have also topic here:http://stackoverflow.com/questions/7217159/implementing-onshowcustomv...
>
> 2011/10/20 luciofm <luci...@xxxxxxxxx>
>
>
>
>
>
>
>
> > Hi novemberox
>
> > Any progress on this??? I'm having the same issue in a project
>
> > If I don't find any solution I'll have to redirect it to the videoplayer
> > via Intent unitl the ICS source code is released.
>
> > Thanks
> > Lúcio Maciel
> > luci...@xxxxxxxxx
>
> > On Wed, Aug 31, 2011 at 07:45, novemberox <novembe...@xxxxxxxxx> wrote:
>
> >> I also found, that enabling hardware acceleration fix issue with
> >> playing embedded video. Full screen still doesn't work.
>
> >> On 29 Sie, 21:34, novemberox <novembe...@xxxxxxxxx> wrote:
> >> > A tip would be useful :)
>
> >> > I tried to find Google browser sources in Android 3.1, but I'm not
> >> > quite sure if sources here:
> >>http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a...
> >> > are the sources used in 3.1.
>
> >> > On 27 Sie, 22:28, novemberox <novembe...@xxxxxxxxx> wrote:
>
> >> > > Hi,
>
> >> > > I'm trying to play video in html on fullscreen. When I click on
> >> > > fullscreen button in video method onShowCustomView is fired. Here is
> >> > > my implementation:
>
> >> > >         public void onShowCustomView(View view, CustomViewCallback
> >> callback)
> >> > > {
> >> > >                 super.onShowCustomView(view, callback);
> >> > >                 if (view instanceof FrameLayout) {
> >> > >                         customComponenet.addView(view, new
> >> FrameLayout.LayoutParams(
>
> >> ViewGroup.LayoutParams.FILL_PARENT,
> >> > > ViewGroup.LayoutParams.FILL_PARENT,
> >> > >                                         Gravity.CENTER));
> >> > >                         customComponenet.setVisibility(View.VISIBLE);
> >> > >                 }
> >> > >         }
> >> > > Where customComponenet is FrameLayout placed on top of my current
> >> > > layout. Wideo is playing good, it's visibile and everything seams to
> >> > > be ok but it throws:
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235): FATAL EXCEPTION: main
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):
> >> > > java.lang.NullPointerException
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
>
> >> android.webkit.HTML5VideoFullScreen.switchProgressView(HTML5VideoFullScreen
> >> .java:
> >> > > 320)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > android.webkit.HTML5VideoView.setPlayerBuffering(HTML5VideoView.java:
> >> > > 319)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > android.webkit.HTML5VideoView.start(HTML5VideoView.java:85)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > android.webkit.HTML5VideoViewProxy
> >> > > $VideoPlayer.onPrepared(HTML5VideoViewProxy.java:257)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
>
> >> android.webkit.HTML5VideoViewProxy.onPrepared(HTML5VideoViewProxy.java:
> >> > > 278)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > android.webkit.HTML5VideoView.onPrepared(HTML5VideoView.java:265)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
>
> >> android.webkit.HTML5VideoFullScreen.onPrepared(HTML5VideoFullScreen.java:
> >> > > 164)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:
> >> > > 1456)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > android.os.Handler.dispatchMessage(Handler.java:99)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > android.os.Looper.loop(Looper.java:132)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > android.app.ActivityThread.main(ActivityThread.java:4028)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > java.lang.reflect.Method.invokeNative(Native Method)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > java.lang.reflect.Method.invoke(Method.java:491)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > com.android.internal.os.ZygoteInit
> >> > > $MethodAndArgsCaller.run(ZygoteInit.java:844)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
> >> > > 08-27 22:16:07.520: ERROR/AndroidRuntime(7235):     at
> >> > > dalvik.system.NativeStart.main(Native Method)
>
> >> > > What am I doing wrong?
>
> >> > > My WebView settings:
> >> > >         webView.getSettings().setJavaScriptEnabled(true);
> >> > >         webView.getSettings().setPluginState(PluginState.ON);
> >> > >         webView.getSettings().setDomStorageEnabled(true);
> >> > >         webView.getSettings().setDatabasePath("/data/data/" +
> >> > > App.class.getPackage().getName() + "/databases");
> >> > >         webView.getSettings().setSupportZoom(false);
>
> >> > > I'm testing on Galaxy Tab 10.1, on default browser this is working
> >> > > just fine. I can switch to fullscreen. Moreover in my app when I play
> >> > > video embeded I can hear only sound and see status bar below area
> >> > > where video should be, while on browser I can see video both embeded
> >> > > in WebView and on fullscreen.
>
> >> --
> >> 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@xxxxxxxxxxxxxxxx
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscribe@xxxxxxxxxxxxxxxx
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en

-- 
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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
android-developers+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<Anterior por Tema] Tema Actual [Siguiente por Tema>
  • [android-developers] Re: Implementando onShowCustomView en Android 3.1 echa en HTML5VideoFullScreen, novemberox <=