Jump to content
Sign in to follow this  
Johan Laurasia

llSetPrimMediaParams() Issue.

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?

Share this post


Link to post
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."

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...