I have seen similar questions posted before but seems the general answer is that it cannot be done.
So, here is my HTML code :
<head>
…
<script type="text/javascript" src="js/processing.js"></script>
…
</head>
<body>
…
<canvas id="my_prog" data-processing-sources="project/my_prog.pde project/my_class.pde"/></canvas>
…
</body>
And in my sketch I use Minim libraries :
import ddf.minim.*;
import ddf.minim.spi.*;
import ddf.minim.ugens.*;
Instead of having my project on my website, there is a rectangular shape proportional to the project size, but without image and sound.
Moreover, this method doesn't work either… I do not know what to do.
Any suggestions? :)
Thank you,
Thib
Think about it this way:
Minim is a Java library, so you can't use it directly in a JavaScript application. Instead, you have to find a JavaScript library that does something similar. You've posted one method (what do you mean when you say it didn't work?), but googling "processing.js audio" or "minim javascript" returns a bunch of others, including this related question:
Exporting a Processing sketch with audio to JavaScript
Also, you should get acquainted with the JavaScript console. In your web browser, press F12, then go to the console tab, then refresh your page. That will show you any errors you're hitting, that way you have more information than "it's a blank rectangle".