The JUCE 8 Preview branch is available now!

How thoroughly tested is the webview plugin demo against hosts on Linux? I was under the impression that GTK Webview was not suitable for plugins because of dynamic symbol errors in GTK2/GTK3 apps or any other plugin that links against the webview .so.

I think it should be up to the library to add the surrounding () in order to parse the literal object correctly. After all, the invocation is for a JSON parser, not for a JavaScript one, so it feels wrong that it’s up to the caller to avoid the string to be mistaken for a JS code block

2 Likes

Another behavioural change to the JavascriptEngine, which again is almost certainly correct in JUCE 8, is that previously in JUCE 7 an empty array would parse as an empty array. But in JUCE 8 is parses as null.

Is it worth a mention in the “breaking changes”?

Yes, that’s a good point.

After all, the invocation is for a JSON parser, not for a JavaScript one

I may be missing a point, but I disagree. We have a fully fledged Javascript parser under the hood. You can define a function e.g.

function f() { return 5; }

and then call it in a next invocation

f()

If you wrap it in () it’s not going to work. Only the users can differentiate between what they want to happen, so we can’t restrict their options by wrapping everything in parentheses.

an empty array would parse as an empty array. But in JUCE 8 is parses as null.

That’s indeed a bug and a fix is on the way. Thank you for reporting it.

The problem you mention shouldn’t be an issue because the WebView on Linux is loaded in an external subprocess.

My mistake: I have skimmed over the topic, then scrolled back from the last post and seen that some of the latest messages were mentioning the JSON class, and I got worried that you were going to change the way it parses JSON strings.

But reading more thoroughly the discrussion, it is about the how the JavascriptEngine class parses the code, right?

1 Like

Perhaps is this an issue that CLion is running both debug and release config/generate steps at the same time and they are somehow conflicting?

No, I was just testing with debug-only configured and it also froze.

1 Like

A few small fixes have now been released on the juce8 branch, including

  • moving the WebViewPluginDemo to the Plugins category,
  • fixing the demo when exporting and building it with the Projucer,
  • fixing the issue where strings containing escape sequences (JSON strings for example) are not properly forwared to the frontend.
2 Likes

Just wanted to share an issue I’ve noticed with the Juce8 branch.

There’s unexpected rendering behavior of Graphics::drawText when called with strings beginning with numeric character and containing an underscore.

Example:

g.drawText("20240320_153336.heic", getBounds(), Justification::topLeft);

renders as:
_15333620240320heic

Prefixing the string with a non-numeric character avoids the issue. Removing the underscore also avoids the issue.

Only Windows tested so far.

Let me know if anyone wants more details or to test again.

Thanks for the great work!

2 Likes

Before digging around the new webview feature …does it support AUv3 on iOS ?
If yes could you point me to a tutorial on how to deploy WebViewPluginDemo on a real device ?
Thx a lot

It does, and you can run the WebViewPluginDemo’s AUv3 build to test it.

Sadly, I don’t have a good tutorial, but it shouldn’t be any different than generally developing for iOS.

Briefly, you should create a new project in the Projucer, add Xcode (iOS) to the Exporters, and under the Xcode (iOS) exporter settings you should set the “Development Team ID” to the 10 character identifier that you can find in Keychain Access next to your Apple development certificate.

You should install a host on the device e.g. Garageband, and specify it when you press the play button in Xcode. For anything more specific it’s best if you refer to official Apple developer documentations, because I can only talk about what worked on my machine.

Thank you, we can reproduce the issue and are looking into it.

2 Likes

I have a fix coming for this!

3 Likes

Thx for your time. Will try it out

I get severe flickering when resizing my stand-alone app window:

If you’re wondering why the giant CRT screen on the left is not flickering, that’s not drawn with D2D but with an OpenGL context, so I can run various shaders.

3 Likes

Did you try switching between native and non native title bar?

Then it doesn’t flicker, but the non-native title bar is even the default for JUCE stand-alone apps and plugins, so I would expect it to work correctly.

I prefer the cleaner, modern app look.

1 Like

The flicker is pretty bad. Dig those sweet chiptunes though!

Are you using setBufferedToImage?

No, I had to remove all setBufferedToImage calls, because then JUCE would throw an assertion.

See here: