Jump to content

HTML prim face going dark


Xilin Yifu
 Share

You are about to reply to a thread that has been inactive for 2082 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi all. I sent the following issue to the Lindens in a ticket. They replied and made a lot of effort to try and solve my problem, but in the end they couldn't solve it and suggested I re-post my issue to the forums. Sorry for the long post. Any guidance hugely appreciated ?
 
-----------------------------------------------------------------
 
For the last couple of years my students have been using a HUD (see above) I designed to allow chatted text in Chinese characters output by the NPCs in our region to display on a prim face using the following:
html = "data:text/html;charset=utf-8," + llEscapeURL(html);
llSetPrimMediaParams(0, // Side to display the media on.
            [
                PRIM_MEDIA_AUTO_PLAY,TRUE, // Show this page immediately
                PRIM_MEDIA_CURRENT_URL,html, // The url currently showing
                PRIM_MEDIA_HOME_URL,html, // The url if they hit 'home'
                PRIM_MEDIA_HEIGHT_PIXELS,100, // Height/width of media texture will be //512
                PRIM_MEDIA_WIDTH_PIXELS,220]); // rounded up to nearest power of 2.}
 
Up until I installed the latest version of Firestorm (5.1.7 (55786)) yesterday, the prim face was always white, so the text displayed clearly on the HUD. From yesterday, the prim face turns very dark (see attached photos) as soon as the text is sent to the prim face (via llListen). The Chinese character text can still be read, but it is very hard as the prim face is so dark.
I did contact the Firestorm help group and they suggested I try the latest SL viewer, which I did. The result was the same as for the Firestorm viewer. They suggested that if this is the case I should contact you to see if you might be able to give me any leads as to what might be suddenly causing this problem.
My students will be starting lessons in the next week and I am really concerned that this problem is going to make it difficult for them to complete the tasks set. Any guidance would be hugely appreciated.
If you would like to obtain a copy of the HUD (Chinese Island HUD KV21 (WEAR OR ATTACH)) for testing, one can be obtained at the following location by clicking the red sign "Chinese Island HUD":
To get the NPC there to say something to you, please input the following into chat:
/3 你好
This will cause him to respond with 您好.
Once again, any guidance you can offer would be hugely appreciated.
Thank you!
Kaylee

Screenshot_20180802-235235.png

Screenshot_20180802-235254.png

Link to comment
Share on other sites

11 minutes ago, Xilin Yifu said:

I sent the following issue to the Lindens in a ticket. They replied and made a lot of effort to try and solve my problem, but in the end they couldn't solve it and suggested I re-post my issue to the forums

Yeah support cannot fix this.  It needs a fix in the viewer code.
The only workaround is to get your users to roll back to the previous Firestorm release or a version of the LL viewer before they released the media updates.

Link to comment
Share on other sites

5 hours ago, Chaser Zaks said:

I believe this is because the background is by default set to transparent.

Try adding this to the css:


html,body{
 	background:#ffffff; /*White background should force it to look normal*/ 
}

 

You can do the CSS in-line. This should work. You may need to change the font size, and justification settings to your liking.

UTFText = "My UTF text... Chinese, Japanese, anything.";

html = "data:text/html;charset=utf-8,<head><style type=text/css>body {background-color:White; font-family:sans-serif; font-size:40px; display:flex; justify-content:center; align-items:center; text-align: center; } </style></head><body>" + UTFText + "</body>";

BTW, I haven't encountered text that needed to be URL escaped doing it this way. Have you? Then again, I want HTML to survive being passed in, and users don't have control over what is displayed.

Edited by Phate Shepherd
  • Like 2
  • Thanks 2
Link to comment
Share on other sites

Hi again everyone,

Just to let you know that the following change to the script fixed the problem:

 

html = "data:text/html;charset=utf-8,<head><style type=text/css>body {background-color:White} </style></head><body>" + UTFText + "</body>";

 

Thank you very much to Phate, Chaser and everyone for responding and your suggestions. I am extremely grateful.

 

See you inworld!

 

Cheers,

Kaylee  :x

  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2082 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...