Skip to content
lsl.devlsl.devLSL Dev

llParcelMediaQuery

function
Function syntax
list llParcelMediaQuery(
  1. list query// A list of PARCEL_MEDIA_COMMAND_* attributes to query.
);
Returns
list
Delay
2 s
Energy
10

Queries the media properties of the parcel containing the script, returning a list of values in the order requested by query. Only works if the object is owned by the landowner or deeded to the land's group.

Returns a list containing results of query. The results are in the same order as the request.

How to use
list result = llParcelMediaQuery([]);
From the LSL definitions: ParcelMediaQuery (rule and request, then what it returns)
// Media settingsPARCEL_MEDIA_COMMAND_URL → string urlPARCEL_MEDIA_COMMAND_TEXTURE → key uuid  // the texture the media replacesPARCEL_MEDIA_COMMAND_TYPE → string mime_type  // e.g. "text/html"PARCEL_MEDIA_COMMAND_SIZE → integer x, integer y  // pixelsPARCEL_MEDIA_COMMAND_DESC → string descPARCEL_MEDIA_COMMAND_LOOP_SET → float loop  // loop duration
  • This script’s object must be owned by the landowner or the function will silently fail.
  • If the script’s object is over group owned land, then the object must be deeded to that group.
Example 1
//-- quick function to tell you the URL of the Media the Parcel is set for
default{
touch_start( integer vIntNull ){ //-- named null because we're ignoring it
llSay( 0, "The Media URL is\n" + (string)llParcelMediaQuery( (list)PARCEL_MEDIA_COMMAND_URL ) );
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.