Jump to content

llSetPrimMediaParams() Issue.


Johan Laurasia
 Share

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

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

Recommended Posts

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?

Link to comment
Share on other sites

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."

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...