# llGetLinkMedia

*LSL function*

```lsl
list list llGetLinkMedia(integer link, integer face, list params);
```

- `integer link`: Link number (1 for root, >1 for children) or a LINK_* flag.
- `integer face`: Face number (side) of the prim.
- `list params`: A list of PRIM_MEDIA_* property constants to retrieve values for.

- Returns: `list`
- Energy: 10

Get the media **params** for a particular **face** on a **link**ed prim, given the desired list of named *param*s.

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

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

```lsl title="How to use" frame="terminal"
list result = llGetLinkMedia(0, 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 GetLinkMedia(integer link, 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, face, flag);
    }
    if(output == input)
        return [];
    return output;
}
```

## History

Date of Release [10/08/2011](https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_Server/11#11-08-10-238207)

## Known issues

From the issue templates included by the wiki article:

- SVC-7422 (bug): ll\*LinkMedia functions do not work with LINK\_\* flags

## See also

### Functions

- [llGetPrimMediaParams](/functions/llGetPrimMediaParams/)
- [llSetLinkMedia](/functions/llSetLinkMedia/)
- [llClearLinkMedia](/functions/llClearLinkMedia/)

---

*Source: [LlGetLinkMedia](https://wiki.secondlife.com/wiki/LlGetLinkMedia) on the Second Life Wiki. Content from the Second Life Wiki articles LlGetLinkMedia (revision 1211307, 2022-09-13), Template:LSL Constants/PrimMedia/Controls (revision 1160766, 2012-01-08), Template:LSL Constants/PrimMedia (revision 1218888, 2026-06-05), Template:LSL Function/face (revision 1175878, 2013-01-06), Template:LSL Function/link (revision 1216622, 2024-05-04) and Template:Issues/SVC-7422 (revision 1167333, 2012-05-16), CC BY-SA 3.0.*

---

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