Skip to content
lsl.devlsl.devLSL Dev

llGetLinkMedia

function
Function syntax
list llGetLinkMedia(
  1. integer link,// Link number (1 for root, >1 for children) or a LINK_* flag. Values: Link
  2. integer face,// Face number (side) of the prim. Values: Faces
  3. 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 linked prim, given the desired list of named params.

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

Returns a list of values in the order requested.

How to use
list result = llGetLinkMedia(0, 0, []);
From the LSL definitions: PrimMediaParam (rule and request, then what it returns)
// AddressPRIM_MEDIA_CURRENT_URL → string current_url  // at most 1024 characters; setting it navigatesPRIM_MEDIA_HOME_URL → string home_url  // at most 1024 characters// PlaybackPRIM_MEDIA_AUTO_PLAY → integer boolean  // plays when a resident can see itPRIM_MEDIA_AUTO_LOOP → integer booleanPRIM_MEDIA_AUTO_SCALE → integer boolean  // media fills the facePRIM_MEDIA_AUTO_ZOOM → integer boolean  // a click zooms and focusesPRIM_MEDIA_FIRST_CLICK_INTERACT → integer boolean  // TRUE passes the first click to the page// SizePRIM_MEDIA_WIDTH_PIXELS → integer width  // 0 to 2048PRIM_MEDIA_HEIGHT_PIXELS → integer height  // 0 to 2048// Controls and accessPRIM_MEDIA_CONTROLS → integer control  // PRIM_MEDIA_CONTROLS_STANDARD or _MINIPRIM_MEDIA_PERMS_INTERACT → integer perms  // PRIM_MEDIA_PERM_*: who can interactPRIM_MEDIA_PERMS_CONTROL → integer perms  // PRIM_MEDIA_PERM_*: who sees the control barPRIM_MEDIA_WHITELIST_ENABLE → integer boolean  // navigation limited to the whitelistPRIM_MEDIA_WHITELIST → string CSV  // escaped URLs; up to 64 or 1024 charactersPRIM_MEDIA_ALT_IMAGE_ENABLE → integer boolean  // not implemented
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;
}

Date of Release 10/08/2011

From the issue templates included by the wiki article:

  • SVC-7422 (bug): ll*LinkMedia functions do not work with LINK_* flags
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.