Skip to content
lsl.devlsl.devLSL Dev

Constants in the PrimMediaParam enum.

All constant groups

At a glance, from the LSL definitions
// 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

ConstantTypeValueDescription
PRIM_MEDIA_CURRENT_URLinteger2String. Gets or sets the current URL displayed on the chosen face (maximum 1024 characters). Changing this URL triggers media navigation.
PRIM_MEDIA_HOME_URLinteger3String. Gets or sets the home URL for the chosen face (maximum 1024 characters).

Playback

ConstantTypeValueDescription
PRIM_MEDIA_AUTO_PLAYinteger5Boolean. Gets or sets whether media auto-plays when a resident is able to view it.
PRIM_MEDIA_AUTO_LOOPinteger4Boolean. Gets or sets whether auto-looping is enabled for the face media.
PRIM_MEDIA_AUTO_SCALEinteger6Boolean. Gets or sets whether auto-scaling is enabled, which forces the media to fill the entire texture size.
PRIM_MEDIA_AUTO_ZOOMinteger7Boolean. Gets or sets whether clicking the media triggers auto-zoom and auto-focus.
PRIM_MEDIA_FIRST_CLICK_INTERACTinteger8Boolean. 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

ConstantTypeValueDescription
PRIM_MEDIA_WIDTH_PIXELSinteger9Integer. Gets or sets the width of the media in pixels.
PRIM_MEDIA_HEIGHT_PIXELSinteger10Integer. Gets or sets the height of the media in pixels.

Controls and access

ConstantTypeValueDescription
PRIM_MEDIA_CONTROLSinteger1Integer. Gets or sets the style of media controls (can be set to PRIM_MEDIA_CONTROLS_STANDARD or PRIM_MEDIA_CONTROLS_MINI).
PRIM_MEDIA_PERMS_INTERACTinteger13Integer. Gets or sets the permissions mask controlling who can interact with the media (PRIM_MEDIA_PERM_ANYONE, _GROUP, _NONE, or _OWNER).
PRIM_MEDIA_PERMS_CONTROLinteger14Integer. 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_ENABLEinteger11Boolean. Gets or sets whether media navigation is restricted to the URLs listed in PRIM_MEDIA_WHITELIST.
PRIM_MEDIA_WHITELISTinteger12Gets 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_ENABLEinteger0Boolean. 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