Johan Laurasia Posted November 10, 2016 Posted November 10, 2016 This is one of those "I've been gone for a few years and now I'm back" posts... and I'm having an issue with a script I'm working on. The script is based on this code snippet that I pulled from the wiki show(string html) { html = "data:text/html," + 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,512, // Height/width of media texture will be PRIM_MEDIA_WIDTH_PIXELS,512]); // rounded up to nearest power of 2. } default { state_entry() { show("<h1>This is a test</h1><h2>This is a test</h2><h3>This is a test</h3>"); } }When I run it, it works, but not until I interact with the prim by clicking on it. It doesn't print immediately. In the script I'm working on, I'm refreshing the display every 5 seconds, but it still doesn't display text until you click on the display face, then the next time it updates, the text shows. Anyone have any ideas?
Rolig Loon Posted November 10, 2016 Posted November 10, 2016 Welcome back, Johan. As far as I have ever understood, what you're seeing is "expected behavior." MOAP is viewer-specific, so what one person sees on her screen is not the same as what another one sees on hers. Each person has to trigger the start of a media stream by clicking on the display face of the prim you've scripted. Once she's done that, the graphics card knows what to look for and subsequent updates will refresh the display. Frankly, I have never understood what PRIM_MEDIA_AUTO_PLAY is supposed to mean, since it doesn't do what you and I would expect. The only interpretation that makes sense is that the wiki note ("Sets whether the media auto-plays when a Resident can view it. ") means "when the resident has enabled it by clicking."
Johan Laurasia Posted November 10, 2016 Author Posted November 10, 2016 Yeah, that's what I feared... ok, thanks. Nice to see you're still around answering questions like the old days.
Recommended Posts
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