Hi,

This is a bit odd - For me, just going to www.flash.com, downloading the
rpm (or indeed, the repository file), installing it via the package
manager and restarting the browser works fine.

The only thing I get problems with is that opening a file from the
downloads tab in the browser can make the window appear behind the
browser itself (haven't investigated this bug yet).

Is there something about this standard process that doesn't work?

Cheers,

--Chris


On Wed, 2009-09-09 at 13:37 +0800, Wu, Yong wrote:
> Message: 3
> > Date: Wed, 9 Sep 2009 10:35:22 +0800 (CST)
> > From: zhang...@nfs-china.com
> > To: dev@moblin.org
> > Subject: [Moblin Dev] [Moblin] How to use the flash plugin to play on
> >         the     web browser
> > Message-ID: <39635.124.16.138.52.1252463722.squir...@124.16.138.3>
> > Content-Type: text/plain;charset=gb2312
> >
> > I want to play flash on the browser, but I don't how to do.
> > Please tell me how to do, thanks.
> > Is install any plugin and rpm package?
> >
> > -zhangkun
> >   
> * If you are talking about playing flash on moblin-web-browser, you 
> could download/install the flash plugin from the uri below (sorry please 
> do it manually this while, but the plugin installation feature will come 
> soon):
> https://addons.mozilla.org/en-US/firefox/browse/type:7
> 
> Once the installation done, please create a soft link to libflashplayer.so:
> ln -s /path/to/libflashplayer.so ~/.mozilla/plugin/libflashplayer.so
> 
> This is all you need to do to play flash in moblin-web-browser I think.
> 
> * If you want flash to be played by clutter-mozembed/tests/test-mozembed 
> demo, you need some extra work to hack the demo program. We are 
> preparing some documentations on this. But before that doc is ready, 
> please refer to patch below (make sure the plugin is already installed).
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 43d99a8..a8ec919 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -7,7 +7,8 @@ AM_CPPFLAGS = \
>  AM_LDFLAGS = \
>       $(CLUTTER_LIBS) \
>       $(MOZILLA_LIBS) \
> -     $(GTK_LIBS)
> +     $(GTK_LIBS) \
> +    -lclutter-gtk-0.10
>  
>  noinst_PROGRAMS = \
>       test-mozembed \
> diff --git a/tests/test-mozembed.c b/tests/test-mozembed.c
> index 0fea74f..6184a7a 100644
> --- a/tests/test-mozembed.c
> +++ b/tests/test-mozembed.c
> @@ -6,6 +6,8 @@
>  
>  #ifdef SUPPORT_PLUGINS
>  #include <gtk/gtk.h>
> +#include <clutter/x11/clutter-x11.h>
> +#include <clutter-gtk/clutter-gtk.h>
>  #endif
>  
>  static void
> @@ -93,8 +95,25 @@ close_cb (ClutterMozEmbed *mozembed,
>    clutter_actor_destroy (stage);
>  }
>  
>  static void
> -new_window_cb (ClutterMozEmbed *mozembed, ClutterActor *new_mozembed)
> +new_window_cb (ClutterMozEmbed *mozembed, ClutterActor **new_mozembed)
>  {
>    ClutterTimeline *timeline;
>    ClutterBehaviour *z_rot;
> @@ -102,15 +121,21 @@ new_window_cb (ClutterMozEmbed *mozembed, ClutterActor 
> *new_mozembed)
>  
>    stage = clutter_stage_new ();
>  
> +  *new_mozembed = clutter_mozembed_new_for_new_window();
> +
>    clutter_actor_set_size (stage, 640, 480);
> -  clutter_container_add_actor (CLUTTER_CONTAINER (stage), new_mozembed);
> -  clutter_actor_set_size (new_mozembed, 640, 480);
> -  g_signal_connect (new_mozembed, "size-request",
> +  clutter_container_add_actor (CLUTTER_CONTAINER (stage), *new_mozembed);
> +  clutter_actor_set_size (*new_mozembed, 640, 480);
> +  g_signal_connect (*new_mozembed, "size-request",
>                      G_CALLBACK (size_request_cb), stage);
> -  g_signal_connect (new_mozembed, "closed",
> +  g_signal_connect (*new_mozembed, "closed",
>                      G_CALLBACK (close_cb), stage);
> -  g_signal_connect (new_mozembed, "download",
> +  g_signal_connect (*new_mozembed, "download",
>                      G_CALLBACK (download_cb), NULL);
>  
>    timeline = clutter_timeline_new (8000);
>    z_rot =
> @@ -122,14 +147,35 @@ new_window_cb (ClutterMozEmbed *mozembed, ClutterActor 
> *new_mozembed)
>                                    360);
>    clutter_behaviour_rotate_set_center (CLUTTER_BEHAVIOUR_ROTATE (z_rot),
>                                         320, 240, 0);
> -  clutter_behaviour_apply (z_rot, new_mozembed);
> +  clutter_behaviour_apply (z_rot, *new_mozembed);
>    clutter_timeline_set_loop (timeline, TRUE);
>    //clutter_timeline_start (timeline);
>  
>    clutter_actor_show (stage);
> -  clutter_stage_set_key_focus (CLUTTER_STAGE (stage), new_mozembed);
> +  clutter_stage_set_key_focus (CLUTTER_STAGE (stage), *new_mozembed);
>  }
>  
> +#ifdef SUPPORT_PLUGINS
> +static GdkFilterReturn
> +gdk_to_clutter_event_forward (GdkXEvent *xevent,
> +                              GdkEvent *event,
> +                              gpointer data)
> +{
> +  switch (clutter_x11_handle_event ((XEvent*)xevent))
> +    {
> +    default:
> +    case CLUTTER_X11_FILTER_CONTINUE:
> +      return GDK_FILTER_CONTINUE;
> +    case CLUTTER_X11_FILTER_TRANSLATE:
> +      return GDK_FILTER_TRANSLATE;
> +    case CLUTTER_X11_FILTER_REMOVE:
> +      return GDK_FILTER_REMOVE;
> +    }
> +
> +  return GDK_FILTER_CONTINUE;
> +}
> +#endif
> +
>  int
>  main (int argc, char **argv)
>  {
> @@ -138,13 +184,25 @@ main (int argc, char **argv)
>    ClutterActor *stage, *mozembed;
>  
>  #ifdef SUPPORT_PLUGINS
> -  gtk_init (&argc, &argv);
> -#endif
> +  if (!gtk_clutter_init (&argc, &argv))
> +      g_error ("Error initialising GtkClutter");
>  
> -  clutter_init (&argc, &argv);
> +  gdk_window_add_filter (NULL, gdk_to_clutter_event_forward, NULL);
> +
> +  GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
> +  g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
> +
> +  GtkClutterEmbed *clutter = GTK_CLUTTER_EMBED(gtk_clutter_embed_new());
> +  gtk_widget_set_size_request ((GtkWidget*)clutter, 800, 600);
>  
> +  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (clutter));
> +
> +  stage = gtk_clutter_embed_get_stage (clutter);
> +#else
> +  clutter_init (&argc, &argv);
>    stage = clutter_stage_get_default ();
>    clutter_actor_set_size (stage, 800, 600);
> +#endif
>  
>    mozembed = clutter_mozembed_new ();
>    clutter_container_add_actor (CLUTTER_CONTAINER (stage), mozembed);
> @@ -183,6 +241,10 @@ main (int argc, char **argv)
>                      G_CALLBACK (new_window_cb), NULL);
>    g_signal_connect (mozembed, "download",
>                      G_CALLBACK (download_cb), NULL);
> +#ifdef SUPPORT_ZOOM_WINDOW
> +  g_signal_connect (mozembed, "zoom-window",
> +                    G_CALLBACK (zoom_window_cb), NULL);
> +#endif
>  
>    if (argc == 2)
>      clutter_mozembed_open (CLUTTER_MOZEMBED (mozembed), argv[1]);
> @@ -190,11 +252,18 @@ main (int argc, char **argv)
>      clutter_mozembed_open (CLUTTER_MOZEMBED (mozembed),
>                             "http://news.google.co.uk/";);
>  
> +#ifdef SUPPORT_PLUGINS
> +  gtk_widget_show_all (window);
> +#endif
>    clutter_actor_show (stage);
>  
>    clutter_stage_set_key_focus (CLUTTER_STAGE (stage), mozembed);
>  
> +#ifdef SUPPORT_PLUGINS
> +  gtk_main();
> +#else
>    clutter_main ();
> +#endif
>  
>    return 0;
>  }
> 
> 
> Regards, Yong
> _______________________________________________
> Moblin dev Mailing List
> dev@moblin.org
> 
> To manage or unsubscribe from this mailing list visit:
> http://lists.moblin.org/listinfo/dev or your user account on 
> http://moblin.org once logged in.
> 
> For more information on the Moblin Developer Mailing lists visit:
> http://moblin.org/community/mailing-lists


_______________________________________________
Moblin dev Mailing List
dev@moblin.org

To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org 
once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

Reply via email to