# llParcelMediaQuery

*LSL function*

```lsl
list list llParcelMediaQuery(list query);
```

- `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](https://wiki.secondlife.com/wiki/list) containing results of **query**. The results are in the same order as the request.

```lsl title="How to use" frame="terminal"
list result = llParcelMediaQuery([]);
```

## Specification

Constant group [ParcelMediaQuery](/constants/groups/ParcelMediaQuery/):

```lsl
PARCEL_MEDIA_COMMAND_DESC = 12
PARCEL_MEDIA_COMMAND_LOOP_SET = 13
PARCEL_MEDIA_COMMAND_SIZE, integer x, integer y
PARCEL_MEDIA_COMMAND_TEXTURE = 4
PARCEL_MEDIA_COMMAND_TYPE = 10
PARCEL_MEDIA_COMMAND_URL = 5
```

## Caveats

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

## Examples

<details open>
<summary>Example 1</summary>

```lsl
//-- 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 ) );
  }
}
```

</details>

## See also

### Functions

- [llParcelMediaCommandList](/functions/llParcelMediaCommandList/)

---

*Source: [LlParcelMediaQuery](https://wiki.secondlife.com/wiki/LlParcelMediaQuery) on the Second Life Wiki. Content from the Second Life Wiki articles LlParcelMediaQuery (revision 1194427, 2015-01-22) and Template:LSL Constants/Parcel Media (revision 935833, 2010-06-05), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llParcelMediaQuery/
