plugin badness

Koos Vriezen koos.vriezen at xs4all.nl
Thu Mar 18 18:10:14 GMT 2004


On Thu, Mar 18, 2004 at 09:18:35AM +0100, David Faure wrote:
> On Wednesday 17 March 2004 18:05, Koos Vriezen wrote:
> > On Tue, Mar 16, 2004 at 05:29:40PM -0500, George Staikos wrote:
> > > On Tuesday 16 March 2004 15:15, Koos Vriezen wrote:
> > > > > Now how could a kpart present itself as more then one plugin more
> > > > > generally? Also using properies in .desktop files.. doesn't sound that
> > > > > dynamic... Hmm, what if we add a pluginsinfo property that points to this
> > > > > file. So if a part has this property, try open this file and register
> > > > > plugin as it used to be.
> > > >
> > > > Attached this propery points to plugin info filename idea. Needs also a
> > > > small change in nspluginscan to add to
> > > > ~/.kde/share/services/nsplugin.desktop
> > > > X-KDE-BrowserView-PluginsInfo=nsplugins/pluginsinfo
> > > 
> > >    I really can't test or properly review right now, sorry.  I have to leave 
> > > it up to you to patch as you see fit.  In any case, KHTML generally gets 
> > > fully backported so you can expect that these things will end up in the 
> > > branch.  Please backport the fixes, though, in case they get lost somehow.
> > 
> > Ok, for others to comment a final version. It should be backwards compatable
> > with pre 'this stuff' plugin scans. Also changes for kjavaappletviewer
> > to participate in this plugin array.
> 
> Looks ok, but doesn't fully solve the problem, does it?
> 
> AFAICS this change means that there is now no more entry in navigator.plugins
> for "a postscript viewer" if one doesn't have a netscape plugin for it (but kghostviewpart)?
> Or SVG, which should embed ksvg.
> 
> I guess we also need a hardcoded list of mimetypes we accept to export to
> navigator.plugins then? (and to keep the code that your patch is deleting,
> for those .desktop files that don't have PluginsInfo but that we still want
> to export).
> Ah, either that or we ask e.g. kghostview and ksvg to provide a pluginsinfo
> file (was that the plan?).

Yes, indeed I provided the one for kjavaappletviewer with the patch as an example.
There is another problem with the .desktop file alone and that is the name field
(xxx in navigator.plugin["xxx"]), sometimes scripts expect a certain name. Eg.
'Shockwave Flash' and not 'Shockwave Flash Media' in this script
(from http://3voor12.vpro.nl/3voor12/index.jsp)

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ?
              navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");


The original reason to change this for me, was a script on
  http://www-306.ibm.com/e-business/doc/content/ondemand/tvspot.html
that checked for QuickTime/RealPlayer/Media Player in this plugin array. I got
this site (well Real only) working by mentioning all these player in the
comment field of the .desktop of kmplayer. But now with this pluginsinfo
possibility, I can create three plugin entries like

number=3

[0]
description=RealPlayer LiveConnect-Enabled Plug-In
file=libkmplayerpart.so
mime=audio/x-pn-realaudio:rm:Real Audio Stream
name=RealPlayer

[1]
description=Windows Media Player Plug-in
file=libkmplayerpart.so
mime=audio/x-ms-wma:wma:Windows Media Audio;video/x-ms-asf:asx,asf:Media Files;video/x-ms-wmv:wmv:Windows Media Video
name=Windows Media Player

[2]
description=QuickTime Movie
file=libkmplayerpart.so
mime=video/quicktime:mov,qt:QuickTime
name=QuickTime Plug-in

(realplay for netscape actually registers more than one plugin)

So yes, we should ask kghostview (does that plugin work btw, last time I checked it
didn't - I mean as an OBJECT one) and ksvg to provide something similar.
However If you can think of something better, cleaner and/or powerfull please
say so. (Actually, George comments made me discover these properties for the
first time)


Koos




More information about the kfm-devel mailing list