# llGetPrimMediaParams

*LSL function*

```lsl
list list llGetPrimMediaParams(integer face, list params);
```

- `integer face`: Face number (side) of the prim.
- `list params`: A list of PRIM_MEDIA_* property constants to retrieve values for.

- Returns: `list`
- Delay: 1 s
- Energy: 10

Get the media **params** for a particular face on an object, given the desired list of names.

Returns an empty list if no media exists on the face.

Returns a [list](https://wiki.secondlife.com/wiki/list) of values in the order requested.

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

## Specification

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

```lsl
PRIM_MEDIA_ALT_IMAGE_ENABLE = 0
PRIM_MEDIA_AUTO_LOOP = 4
PRIM_MEDIA_AUTO_PLAY = 5
PRIM_MEDIA_AUTO_SCALE = 6
PRIM_MEDIA_AUTO_ZOOM = 7
PRIM_MEDIA_CONTROLS = 1
PRIM_MEDIA_CURRENT_URL = 2
PRIM_MEDIA_FIRST_CLICK_INTERACT = 8
PRIM_MEDIA_HEIGHT_PIXELS = 10
PRIM_MEDIA_HOME_URL = 3
PRIM_MEDIA_PERMS_CONTROL = 14
PRIM_MEDIA_PERMS_INTERACT = 13
PRIM_MEDIA_WHITELIST = 12
PRIM_MEDIA_WHITELIST_ENABLE = 11
PRIM_MEDIA_WIDTH_PIXELS = 9
```

## Helper functions

```lsl
list GetPrimMediaParams(integer face, list input)
{//Returns a list that can be fed to llSetLinkMedia or llSetPrimMediaParams
    list output;
    integer c = ~llGetListLength(input);
    while((c = - ~c))
    {
        list flag = llList2List(input, c, c);
        output += flag + llGetLinkMedia(LINK_THIS, face, flag);
    }
    if(output == input)
        return [];
    return output;
}
```

## History

- SVN:2816 r134947 Trunk
- [SVC-4939](https://jira.secondlife.com/browse/SVC-4939)

## Known issues

From the issue templates included by the wiki article:

- SVC-4939 (bug): \[http://svn.secondlife.com/trac/linden/changeset/2816 SVN Changeset 2816 in Trunk\] is immature

## See also

### Functions

- [llGetLinkMedia](/functions/llGetLinkMedia/)
- [llSetPrimMediaParams](/functions/llSetPrimMediaParams/)
- [llSetLinkMedia](/functions/llSetLinkMedia/)
- [llClearPrimMedia](/functions/llClearPrimMedia/)
- [llClearLinkMedia](/functions/llClearLinkMedia/)

---

*Source: [LlGetPrimMediaParams](https://wiki.secondlife.com/wiki/LlGetPrimMediaParams) on the Second Life Wiki. Content from the Second Life Wiki articles LlGetPrimMediaParams (revision 1194240, 2015-01-22), Template:LSL Constants/PrimMedia/Controls (revision 1160766, 2012-01-08), Template:LSL Constants/PrimMedia (revision 1218888, 2026-06-05), Template:Issues/SVC-4939 (revision 1162767, 2012-02-13) and Template:LSL Function/face (revision 1175878, 2013-01-06), CC BY-SA 3.0.*

---

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