Jucebrowserplugin demo not working


#1

Hey all,

First off: I’m totally new to mac / programming on the mac, so please excuse my ignorance :slight_smile: Anyway… I’m trying to get the juce browserplugindemo working in firefox. It works fine on windows and it compiles on the mac in xcode 3.2.6 (64bit) (took almost 2 hours, is that normal on a mac?) . However, when I copy “JuceBrowserPluginDemo.plugin” to “library/Internet Plug-Ins”, and start the “test.html” in firefox (64bit, also tried with 32bit mode), firefox tells me the plugin cannot be found. In safari i don’t see the gui from the plugin at all, however when i push the “tell the plugin to show a popup”-button, the dialog does pop up. So in safari it sort of works. My goal is to have it working on both safari and firefox. Can anyone help me ?

Thanks!


#2

If you don’t see the UI in safari, it’s probably because it’s not in 32-bit mode :frowning:

And if FF can’t see it, that usually means there’s something in the bundle resources or plist that it doesn’t like.


#3

I tried running it in both 32bits and 64bits mode, for both safari and firefox. In firefox it wont load at all, in safari no gui even in 32bit mode.

What can be wrong in the bundle resources / plist? I’ve changed nothing, i just compiled the juce demo project as is (juce 1.53).

I searched this forum for threads simulair to my problem, and i found a post from 2009 :
http://www.rawmaterialsoftware.com/viewtopic.php?f=4&t=4430&hilit=browser+plugin

and also from 2011:
http://www.rawmaterialsoftware.com/viewtopic.php?f=4&t=6944&hilit=browser+plugin

Does this mean that this is still a problem? Thus, plugins will never work in 64 bit mode, and in 32 bits mode no gui will be visible?

This still might not be a problem for me, since i’m not really planning on making any gui stuff. Now if only i can get it working in firefox…


#4

btw, in firefox’s error console:

Warning: Use of getAttributeNodeNS() is deprecated. Use getAttributeNS() instead. Source Fire: chrome://browser/content/browser.xul


#5

Getting the right settings is a bit of a black art, and I’m afraid I don’t know what to suggest there, very hard to know what the browser is objecting to. But it does work - I have a commercial client for whom I’ve been using this stuff to create a plugin, and although 64-bit is now a problem, it does load.

64-bit is on my to-do-list - it’ll involve writing a special type of componentpeer to write pixels directly to the browser rather than embedding an NSView like it currently does.


#6

FYI:
edited info.plist and added the following :

	<key>WebPluginMIMETypes</key>
	<dict>
		<key>application/npjucedemo-plugin</key>
		<dict>
			<key>WebPluginExtensions</key>
			<array>
				<string>jucedemo</string>
			</array>
			<key>WebPluginTypeDescription</key>
			<string>Juce Demo</string>
		</dict>
	</dict>

And now its detected in both firefox (only 32bits) and safari (32/64 bits). Using FF 64bits it will hang, and in safari the gui is never shown.


#7

Ah, yes! Thanks!