PrimMediaParam
Constants in the PrimMediaParam enum.
// 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 2048; rounded up to a power of twoPRIM_MEDIA_HEIGHT_PIXELS, integer height // 0 to 2048; rounded up to a power of two// 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
Constants
Address
| Constant | Type | Value | Description |
|---|---|---|---|
PRIM_MEDIA_CURRENT_URL | integer | 2 | String. Gets or sets the current URL displayed on the chosen face (maximum 1024 characters). Changing this URL triggers media navigation. |
PRIM_MEDIA_HOME_URL | integer | 3 | String. Gets or sets the home URL for the chosen face (maximum 1024 characters). |
Playback
| Constant | Type | Value | Description |
|---|---|---|---|
PRIM_MEDIA_AUTO_PLAY | integer | 5 | Boolean. Gets or sets whether media auto-plays when a resident is able to view it. |
PRIM_MEDIA_AUTO_LOOP | integer | 4 | Boolean. Gets or sets whether auto-looping is enabled for the face media. |
PRIM_MEDIA_AUTO_SCALE | integer | 6 | Boolean. Gets or sets whether auto-scaling is enabled, which forces the media to fill the entire texture size. |
PRIM_MEDIA_AUTO_ZOOM | integer | 7 | Boolean. Gets or sets whether clicking the media triggers auto-zoom and auto-focus. |
PRIM_MEDIA_FIRST_CLICK_INTERACT | integer | 8 | Boolean. Gets or sets what happens when someone click on a playing, but unfocused media face: TRUE: Does the same thing a focused media face does, and forwards the click to the web browser. FALSE: Focuses the media prim so that future clicks are forwarded to the web browser. Note: Viewer settings affect this flag. It works by default on most prims. |
Size
| Constant | Type | Value | Description |
|---|---|---|---|
PRIM_MEDIA_WIDTH_PIXELS | integer | 9 | Integer. Gets or sets the width of the media in pixels. |
PRIM_MEDIA_HEIGHT_PIXELS | integer | 10 | Integer. Gets or sets the height of the media in pixels. |
Controls and access
| Constant | Type | Value | Description |
|---|---|---|---|
PRIM_MEDIA_CONTROLS | integer | 1 | Integer. Gets or sets the style of media controls (can be set to PRIM_MEDIA_CONTROLS_STANDARD or PRIM_MEDIA_CONTROLS_MINI). |
PRIM_MEDIA_PERMS_INTERACT | integer | 13 | Integer. Gets or sets the permissions mask controlling who can interact with the media (PRIM_MEDIA_PERM_ANYONE, _GROUP, _NONE, or _OWNER). |
PRIM_MEDIA_PERMS_CONTROL | integer | 14 | Integer. Gets or sets the permissions mask controlling who can see the media control bar (PRIM_MEDIA_PERM_ANYONE, _GROUP, _NONE, or _OWNER). |
PRIM_MEDIA_WHITELIST_ENABLE | integer | 11 | Boolean. Gets or sets whether media navigation is restricted to the URLs listed in PRIM_MEDIA_WHITELIST. |
PRIM_MEDIA_WHITELIST | integer | 12 | Gets or sets the media whitelist as an array of URL strings (up to 64 URLs or 1024 characters, whichever comes first). At the SLua level, provide a {string} array; the serializer encodes it as an escaped, comma-separated string for the underlying LSL API. |
PRIM_MEDIA_ALT_IMAGE_ENABLE | integer | 0 | Boolean. Gets or sets the default image state (the image a user sees before media is active) on a face. The default is specified by the server for that media type. Note: This flag is not currently implemented. |
Used by
llGetLinkMediafunctionReturns a list containing the media parameters of the specified face on the linked prim link, retrieved in the order requested by params.llGetPrimMediaParamsfunctionReturns a list containing the media parameters of the specified face, retrieved in the order requested by params. Returns an empty list if no media exists on the face.llSetLinkMediafunctionSets the media parameters specified by params on face of the linked prim link without a script delay. Returns an integer STATUS_* flag detailing success or failure.llSetPrimMediaParamsfunctionSets the media parameters specified by params on the designated face of the prim. Returns an integer STATUS_* flag detailing success or failure.