Last modified: 2007-09-09 01:37:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 11231 - Couldn't play inline in Opera, when Opera directly accesses Java
Couldn't play inline in Opera, when Opera directly accesses Java
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
OggHandler (Other open bugs)
unspecified
PC Windows Vista
: Normal normal (vote)
: ---
Assigned To: Tim Starling
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-08 10:33 UTC by Christian Thiele
Modified: 2007-09-09 01:37 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Christian Thiele 2007-09-08 10:33:59 UTC
The OggHandler tests for "navigator.javaEnabled()" and for the existence of the MIME-type "application/x-java-applet". The second test fails, if Opera directly access Java and not uses a java plugin dll. I think the first test is sufficient, because Java isn't a plugin in every browser but could be supported natively (like in Opera).
Comment 1 Tim Starling 2007-09-08 10:52:58 UTC
Do you have plugins enabled? It's in the Tools>Quick Preferences menu. The first test is not sufficient, see bug 10949.
Comment 2 Christian Thiele 2007-09-08 11:47:25 UTC
Of course plugins are enabled. But as I mentioned in my first comment, Opera doesn't need a Java plugin, but is able to access Java directly. So only if you have the NPJavaXX.dll (e.g. NPJava14.dll) in your plugins folder the MIME-type exists in navigator.mimeTypes, because otherwise it isn't a plugin.

I'm not sure, if it's a bug in Opera or not, because I don't find clear information, if mimeTypes is only for plugins but for all recognized MIME types. Most sources only speak of plugins, but some documents on mozilla.org speak of "each MIME type supported by the client (either internally, via helper applications, or by plug-ins)." (see http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/reference/nav.html#1193368). The problem is: most browsers - like Firefox - don't have any internally supported MIME-types in the mimeTypes array. Opera _normally_ has (e.g. "image/jpg" with enabledPlugin set to null). But it doesn't have an entry for "application/x-java-applet" - which seems to be a bug. 

But even if it would be in the mimeTypes array, the OggHandler wouldn't work, because it tests, if there is a plugin - which isn't true, if it's internally supported. Maybe one could argue, that there should be a reference to "Mozilla default plugin", but no browser does this and the standard doesn't declare anything about that.

So I don't really have a solution. That navigator.javaEnabled() could be true, if there is no Java on the machine, was new to me - I personally think, a browser should disable java, when there is no java present. So I would only test javaEnabled() ;)
Comment 3 Tim Starling 2007-09-08 19:23:22 UTC
You could just install the plugin, couldn't you? 

You don't have to give me references for the navigator.mimeTypes array -- I read them before I wrote the software, and I studied the contents of navigator.mimeTypes on Opera on my own system. The Mozilla plugin will add application/x-java-applet to navigator.mimeTypes in both Mozilla and Opera. 
Comment 4 Tim Starling 2007-09-08 19:45:12 UTC
Alright, my mistake, it looks like Opera is pulling a Java plugin out of my Netscape Communicator directory, of all places. It doesn't seem to load the Mozilla plugin in the JRE directory, so it wouldn't work on a standard install of Opera and Java. I'll put in a special case.
Comment 5 Tim Starling 2007-09-08 20:23:05 UTC
Special case done in r25673, live on Wikimedia right now. 

It turns out that Opera silently disables the "Java enabled" user preference, and hence navigator.javaEnabled(), if it fails to load a Java DLL. Browser detection (navigator.appName) is the only reasonable way to account for this difference between Opera and Mozilla.
Comment 6 Christian Thiele 2007-09-09 01:37:12 UTC
Thanks a lot! It works now.

Your work is great - thanks for the player. I never had doubts about your JavaScript references knowledge, but some things are - as you know - really weird in some browsers (especially the differences between browsers because of obscurities in standards). Thats why I pointed out the special behavior of Opera in this case.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links