Riccardo Magliocchetti
2008-Apr-29 13:59 UTC
[Swfdec] mozilla-plugin: getting the url of the current web page
Hi, is there a way to get the current page url from the mozilla plugin? I've tried to port the gnash implementation (plugin.cpp nsPluginInstance::getCurrentPageURL()) but firefox dies because of missing symbols (NPN_GetValue), I see there's some tricks on reimplementig the npapi but can't understand it. Any hint? thanks, riccardo
Benjamin Otte
2008-May-01 22:32 UTC
[Swfdec] mozilla-plugin: getting the url of the current web page
The code that Gnash uses (fiddling around with NPObjects, aka doing mad things with Javascript) is not something I consider sane code. And I don't want an ugly mess if I can avoid it. And I don't think there's a proper way to query the current site in a sane way. As for making available APIs, Swfdec wraps all function calls in plugin.c look at the top of that file for some examples - and don't forget to copy the function table entry in the initialization function. NPN_GetValue() is implemented as plugin_get_value() for example. Cheers, Benjamin On Tue, Apr 29, 2008 at 3:59 PM, Riccardo Magliocchetti <riccardo at datahost.it> wrote:> Hi, > > is there a way to get the current page url from the mozilla plugin? > I've tried to port the gnash implementation > (plugin.cpp nsPluginInstance::getCurrentPageURL()) but firefox dies > because of missing symbols (NPN_GetValue), I see there's some tricks on > reimplementig the npapi but can't understand it. > > Any hint? > > thanks, > riccardo > _______________________________________________ > Swfdec mailing list > Swfdec at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/swfdec >