It is currently February 22nd, 2024, 8:49 pm

PluginWebView - Make skin using web technology

Share and get help with Plugins and Addons
User avatar
balala
Rainmeter Sage
Posts: 16007
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: PluginWebView - Make skin using web technology

Post by balala »

Yincognito wrote: December 22nd, 2022, 12:45 am Hmm... I still believe it's not the plugin at fault here, since it's just an implementation to make use of the WebView2 technology. My impression is that it's either WebView2 itself, or, like alluded earlier, some other dependency needed to have it all working. I experienced this type of "silent failure" in other cases as well (not related to this), and properly setting up other areas of the "Windows macrosystem" fixed things then. Nice job trying though! :thumbup:
Might be, don't know. Theoretically you're right. Anyway this is why the dev of the plugin would be needed here. Hoping sooner or later he'll tell us.
User avatar
Yincognito
Rainmeter Sage
Posts: 6780
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: PluginWebView - Make skin using web technology

Post by Yincognito »

balala wrote: December 22nd, 2022, 9:07 pm Might be, don't know. Theoretically you're right. Anyway this is why the dev of the plugin would be needed here. Hoping sooner or later he'll tell us.
True. Even so, very soon future versions of WebView2 runtime will cease to work with Win7 anyway, therefore such concerns will be less and less encountered... It would be great if platforms like this and others would work in all cases, but that's the way things evolve, with "updates" needed for everything in order to keep up with the times.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 6780
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: PluginWebView - Make skin using web technology

Post by Yincognito »

If anyone wants to see how one can fully integrate Webview2 technology in Rainmeter so that the skin behaves at the same time like a webpage and a plain Rainmeter skin while producing a nice outcome, feel free to check my recently released 3D Earth skin.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Robzyy
Posts: 1
Joined: February 2nd, 2024, 1:03 pm

Re: PluginWebView - Make skin using web technology

Post by Robzyy »

Hello everyone! I've decided to give this plugin a try but I've encountered an error. When trying to acess the RainmeterAPI from within JS I get an "Uncaught ReferenceError: RainmeterAPI is not defined" error. This even happens on the example skins. Has anyone encountered this?

Running Win11 23H2, so WebView comes preinstalled... maybe the plugin needs to be updated...
User avatar
Yincognito
Rainmeter Sage
Posts: 6780
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: PluginWebView - Make skin using web technology

Post by Yincognito »

Robzyy wrote: February 2nd, 2024, 1:07 pm Hello everyone! I've decided to give this plugin a try but I've encountered an error. When trying to acess the RainmeterAPI from within JS I get an "Uncaught ReferenceError: RainmeterAPI is not defined" error. This even happens on the example skins. Has anyone encountered this?

Running Win11 23H2, so WebView comes preinstalled... maybe the plugin needs to be updated...
I didn't encounter the issue, but then I'm still on my initial WebView version and on Win 10 (I won't switch to Win 11 anytime soon, if at all, though WebView being pre-installed there is one of the few great news about Win 11). The issue might be a plugin problem (posting it on the plugin's GitHub page too might help in that regard, though an answer or resolution isn't guaranteed since khanhas might be busy with other things), but might also be about making sure other dependencies in the background function correctly and are present (.NET Frameworks or some other Windows setting).

Sorry I can't help more with that, maybe someone with more knowledge on the said Windows version can offer some insight.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
arskvsh
Posts: 1
Joined: February 6th, 2024, 6:02 pm

Re: PluginWebView - Make skin using web technology

Post by arskvsh »

Robzyy wrote: February 2nd, 2024, 1:07 pm Hello everyone! I've decided to give this plugin a try but I've encountered an error. When trying to acess the RainmeterAPI from within JS I get an "Uncaught ReferenceError: RainmeterAPI is not defined" error. This even happens on the example skins. Has anyone encountered this?

Running Win11 23H2, so WebView comes preinstalled... maybe the plugin needs to be updated...
Does it work for you if you right-click on the webpage inside the skin (not the skin itself!) and press "Reload"?
I'm facing the same problem and this strange workaround helps me. However, the problem seems to be back each time I restart Rainmeter or reload the particular skin.

Apparently there's something wrong with the order of the API being connected to WebView instance as it can't be reached only on the first load. I tried to solve the problem with the least effort by rebuilding the plugin from its source code with updated WebView dependencies but haven't got any results. Probably need to dive deeply into the programming...