Difference between revisions of "Template:LSL Constants/PrimMedia"

From Second Life Wiki
Jump to navigation Jump to search
m
m
 
(14 intermediate revisions by 5 users not shown)
Line 2: Line 2:


{{LSL_Function/boolean|boolean}}
{{LSL_Function/boolean|boolean}}
{{#vardefine:p_width_hover|integer value that will be fit to the range [0, 2048]{{#ifeq:{{{1|}}}|get||, if the value is not a power of two it will be rounded up to the next power of two.}}}}
{{#vardefine:p_height_hover|integer value that will be fit to the range [0, 2048]{{#ifeq:{{{1|}}}|get||, if the value is not a power of two it will be rounded up to the next power of two.}}}}
{{LSL Signature/Add|
{{LSL Const/Signature|PRIM_MEDIA_ALT_IMAGE_ENABLE|integer|0|b=[ |e= ]}}
{{LSL Const/Signature|PRIM_MEDIA_CONTROLS|integer|1|b=[ |e= ]|s=rowspan="4"}}
{{LSL Const/Signature|PRIM_MEDIA_CURRENT_URL|integer|2|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_CURRENT_URL"}}
{{LSL Const/Signature|PRIM_MEDIA_HOME_URL|integer|3|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_HOME_URL"}}
{{LSL Const/Signature|PRIM_MEDIA_AUTO_LOOP|integer|4|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_AUTO_LOOP"}}
{{LSL Const/Signature|PRIM_MEDIA_AUTO_PLAY|integer|5|b=[ |e= ]}}
{{LSL Const/Signature|PRIM_MEDIA_AUTO_SCALE|integer|6|b=[ |e= ]}}
{{LSL Const/Signature|PRIM_MEDIA_AUTO_ZOOM|integer|7|b=[ |e= ]}}
{{LSL Const/Signature|PRIM_MEDIA_FIRST_CLICK_INTERACT|integer|8|b=[ |e= ]}}
{{LSL Const/Signature|PRIM_MEDIA_WIDTH_PIXELS|integer|9|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_WIDTH_PIXELS"}}
{{LSL Const/Signature|PRIM_MEDIA_HEIGHT_PIXELS|integer|10|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_HEIGHT_PIXELS"}}
{{LSL Const/Signature|PRIM_MEDIA_WHITELIST_ENABLE|integer|11|b=[ |e= ]|s=rowspan="1"}}
{{LSL Const/Signature|PRIM_MEDIA_WHITELIST|integer|12|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_WHITELIST"}}
{{LSL Const/Signature|PRIM_MEDIA_PERMS_INTERACT|integer|13|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_PERMS_INTERACT"}}
{{LSL Const/Signature|PRIM_MEDIA_PERM_OWNER|integer}}
{{LSL Const/Signature|PRIM_MEDIA_PERM_GROUP|integer}}
{{LSL Const/Signature|PRIM_MEDIA_PERM_ANYONE|integer}}
{{LSL Const/Signature|PRIM_MEDIA_PERMS_CONTROL|integer|14|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_PERMS_INTERACT"}}
}}


}}
}}
{{{!}} {{Prettytable|style=margin: 0px 0px 10px 1pt;}}
{{{!}} {{Prettytable|style=margin: 0px 0px 10px 1pt;}}
{{!}}+ '''This information is very preliminary. It is based on guesswork, parameter types, layout and comments from the [http://svn.secondlife.com/trac/linden/changeset/2816 source code].'''
{{!}}- {{Hl2}}
{{!}}- {{Hl2}}
! colspan="2" {{!}} Parameter
! colspan="2" {{!}} Parameter
Line 13: Line 35:
{{LSL ConstTB|PRIM_MEDIA_ALT_IMAGE_ENABLE|integer|0|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_ALT_IMAGE_ENABLE"}}
{{LSL ConstTB|PRIM_MEDIA_ALT_IMAGE_ENABLE|integer|0|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_ALT_IMAGE_ENABLE"}}
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether an alternate image is enabled.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the default image state (the image that the user sees before a piece of media is active) for the chosen face. The default image is specified by Second Life's server for that media type.
'''Note:''' This flag is not currently implemented.
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_CONTROLS|integer|1|b=[ |e= ]|s=rowspan="4"|s1=id="PRIM_MEDIA_CONTROLS"}}
{{LSL ConstTB|PRIM_MEDIA_CONTROLS|integer|1|b=[ |e= ]|s=rowspan="4"|s1=id="PRIM_MEDIA_CONTROLS"}}
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|control}} ]
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|control}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the style of controls.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the style of controls.  Can be either [[PRIM_MEDIA_CONTROLS_STANDARD]] or [[PRIM_MEDIA_CONTROLS_MINI]].
{{!}}-
{{!}}-
{{LSL Constants/PrimMedia/Controls}}
{{LSL Constants/PrimMedia/Controls}}
Line 23: Line 46:
{{LSL ConstTB|PRIM_MEDIA_CURRENT_URL|integer|2|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_CURRENT_URL"}}
{{LSL ConstTB|PRIM_MEDIA_CURRENT_URL|integer|2|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_CURRENT_URL"}}
{{!}} colspan="2" {{!}} [ [[string]] {{LSL Param|current_url}} ]
{{!}} colspan="2" {{!}} [ [[string]] {{LSL Param|current_url}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the current url.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the current url displayed on the chosen face. Changing this URL causes navigation. 1024 characters Max
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_HOME_URL|integer|3|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_HOME_URL"}}
{{LSL ConstTB|PRIM_MEDIA_HOME_URL|integer|3|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_HOME_URL"}}
{{!}} colspan="2" {{!}} [ [[string]] {{LSL Param|home_url}} ]
{{!}} colspan="2" {{!}} [ [[string]] {{LSL Param|home_url}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the home url.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the home url for the chosen face. 1024 characters max
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_AUTO_LOOP|integer|4|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_AUTO_LOOP"}}
{{LSL ConstTB|PRIM_MEDIA_AUTO_LOOP|integer|4|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_AUTO_LOOP"}}
Line 35: Line 58:
{{LSL ConstTB|PRIM_MEDIA_AUTO_PLAY|integer|5|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_AUTO_PLAY"}}
{{LSL ConstTB|PRIM_MEDIA_AUTO_PLAY|integer|5|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_AUTO_PLAY"}}
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether auto-playing is enabled.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether the media auto-plays when a Resident can view it.
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_AUTO_SCALE|integer|6|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_AUTO_SCALE"}}
{{LSL ConstTB|PRIM_MEDIA_AUTO_SCALE|integer|6|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_AUTO_SCALE"}}
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether auto-scaling is enabled.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether auto-scaling is enabled.  Auto-scaling forces the media to the full size of the texture.
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_AUTO_ZOOM|integer|7|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_AUTO_ZOOM"}}
{{LSL ConstTB|PRIM_MEDIA_AUTO_ZOOM|integer|7|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_AUTO_ZOOM"}}
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether auto-zooming is enabled.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether clicking the media triggers auto-zoom and auto-focus on the media.
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_FIRST_CLICK_INTERACT|integer|8|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_FIRST_CLICK_INTERACT"}}
{{LSL ConstTB|PRIM_MEDIA_FIRST_CLICK_INTERACT|integer|8|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_FIRST_CLICK_INTERACT"}}
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether the first click interaction is enabled.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether the first click interaction is enabled.
'''Note:''' This flag appears not to work.
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_WIDTH_PIXELS|integer|9|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_WIDTH_PIXELS"}}
{{LSL ConstTB|PRIM_MEDIA_WIDTH_PIXELS|integer|9|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_WIDTH_PIXELS"}}
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|height-width|width}} ]
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|width|width}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the width in pixels.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the width of the media in pixels.
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_HEIGHT_PIXELS|integer|10|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_HEIGHT_PIXELS"}}
{{LSL ConstTB|PRIM_MEDIA_HEIGHT_PIXELS|integer|10|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_HEIGHT_PIXELS"}}
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|height-width|height}} ]
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|height|height}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the height in pixels.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the height of the media in pixels.
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_WHITELIST_ENABLE|integer|11|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_WHITELIST_ENABLE"}}
{{LSL ConstTB|PRIM_MEDIA_WHITELIST_ENABLE|integer|11|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_WHITELIST_ENABLE"}}
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="2" {{!}} [ [[integer]] {{LSL Param|boolean}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether the white-list is enabled or disabled.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} whether navigation is restricted to URLs in PRIM_MEDIA_WHITELIST.
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_WHITELIST|integer|12|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_WHITELIST"}}
{{LSL ConstTB|PRIM_MEDIA_WHITELIST|integer|12|b=[ |e= ]|s=rowspan="1"|s1=id="PRIM_MEDIA_WHITELIST"}}
{{!}} colspan="2" {{!}} <!--[ [[list]]&nbsp;{{LSL Param|whitelist}} ]-->
{{!}} colspan="2" {{!}} [ [[string]]&nbsp;{{LSL Param|CSV}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the whitelist.{{Footnote|I have no idea how this is implemented, it seems to take a list of strings, but LSL doesn't allow lists in lists.}}
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the whitelist as a string of [[llEscapeURL|escaped]], comma-separated URLs.  This string can hold up to 64 URLs or 1024 characters, whichever comes first.
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_PERMS_INTERACT|integer|13|b=[&nbsp;|e=&nbsp;]|s=rowspan="1"|s1=id="PRIM_MEDIA_PERMS_INTERACT"}}
{{LSL ConstTB|PRIM_MEDIA_PERMS_INTERACT|integer|13|b=[&nbsp;|e=&nbsp;]|s=rowspan="1"|s1=id="PRIM_MEDIA_PERMS_INTERACT"}}
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{LSL Param|perms}} ]
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{LSL Param|perms}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the permissions mask that control who can interact with the object.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the permissions mask that control who can interact with the object:
*[[PRIM_MEDIA_PERM_NONE]]
*[[PRIM_MEDIA_PERM_OWNER]]
*[[PRIM_MEDIA_PERM_GROUP]]
*[[PRIM_MEDIA_PERM_ANYONE]]
{{!}}-
{{!}}-
{{LSL ConstTB|PRIM_MEDIA_PERMS_CONTROL|integer|14|b=[&nbsp;|e=&nbsp;]|s=rowspan="1"|s1=id="PRIM_MEDIA_PERMS_INTERACT"}}
{{LSL ConstTB|PRIM_MEDIA_PERMS_CONTROL|integer|14|b=[&nbsp;|e=&nbsp;]|s=rowspan="1"|s1=id="PRIM_MEDIA_PERMS_INTERACT"}}
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{LSL Param|perms}} ]
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{LSL Param|perms}} ]
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the permissions mask that control who can control the object.
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the permissions mask that control who can see the media control bar above the object:
*[[PRIM_MEDIA_PERM_NONE]]
*[[PRIM_MEDIA_PERM_OWNER]]
*[[PRIM_MEDIA_PERM_GROUP]]
*[[PRIM_MEDIA_PERM_ANYONE]]
{{!}}-
{{!}}-
{{!}}}
{{!}}}

Latest revision as of 10:55, 18 December 2015

Parameter Return Values / Additional Parameters Description
PRIM_MEDIA_ALT_IMAGE_ENABLE ] 0 [ integer boolean ] Gets / Sets the default image state (the image that the user sees before a piece of media is active) for the chosen face. The default image is specified by Second Life's server for that media type.

Note: This flag is not currently implemented.

PRIM_MEDIA_CONTROLS ] 1 [ integer control ] Gets / Sets the style of controls. Can be either PRIM_MEDIA_CONTROLS_STANDARD or PRIM_MEDIA_CONTROLS_MINI.
controls Flags Description
PRIM_MEDIA_CONTROLS_STANDARD 0 Standard web navigation controls.
PRIM_MEDIA_CONTROLS_MINI 1 Mini web navigation controls; does not include an address bar.
PRIM_MEDIA_CURRENT_URL ] 2 [ string current_url ] Gets / Sets the current url displayed on the chosen face. Changing this URL causes navigation. 1024 characters Max
PRIM_MEDIA_HOME_URL ] 3 [ string home_url ] Gets / Sets the home url for the chosen face. 1024 characters max
PRIM_MEDIA_AUTO_LOOP ] 4 [ integer boolean ] Gets / Sets whether auto-looping is enabled.
PRIM_MEDIA_AUTO_PLAY ] 5 [ integer boolean ] Gets / Sets whether the media auto-plays when a Resident can view it.
PRIM_MEDIA_AUTO_SCALE ] 6 [ integer boolean ] Gets / Sets whether auto-scaling is enabled. Auto-scaling forces the media to the full size of the texture.
PRIM_MEDIA_AUTO_ZOOM ] 7 [ integer boolean ] Gets / Sets whether clicking the media triggers auto-zoom and auto-focus on the media.
PRIM_MEDIA_FIRST_CLICK_INTERACT ] 8 [ integer boolean ] Gets / Sets whether the first click interaction is enabled.

Note: This flag appears not to work.

PRIM_MEDIA_WIDTH_PIXELS ] 9 [ integer width ] Gets / Sets the width of the media in pixels.
PRIM_MEDIA_HEIGHT_PIXELS ] 10 [ integer height ] Gets / Sets the height of the media in pixels.
PRIM_MEDIA_WHITELIST_ENABLE ] 11 [ integer boolean ] Gets / Sets whether navigation is restricted to URLs in PRIM_MEDIA_WHITELIST.
PRIM_MEDIA_WHITELIST ] 12 [ string CSV ] Gets / Sets the whitelist as a string of escaped, comma-separated URLs. This string can hold up to 64 URLs or 1024 characters, whichever comes first.
PRIM_MEDIA_PERMS_INTERACT ] 13 [ integer perms ] Gets / Sets the permissions mask that control who can interact with the object:
PRIM_MEDIA_PERMS_CONTROL ] 14 [ integer perms ] Gets / Sets the permissions mask that control who can see the media control bar above the object: