Difference between revisions of "LlParcelMediaCommandList"

From Second Life Wiki
Jump to navigation Jump to search
m (<lsl> tag to <source>)
 
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{LSL_Function
{{Issues/SVC-1764}}{{Issues/SVC-4478}}{{LSL_Function
|func=llParcelMediaCommandList
|func=llParcelMediaCommandList
|func_id=298|func_sleep=2.0|func_energy=10.0
|func_id=298|func_sleep=2.0|func_energy=10.0
Line 8: Line 8:
|p1_type=list
|p1_type=list
|p1_name=commandList
|p1_name=commandList
|p1_desc=A list of integer options to set as defined below.
|p1_desc=A list of [[integer]] <!--[[#Constants|-->PARCEL_MEDIA_COMMAND_*<!--]]--> flags and their parameters
|constants={{{!}}{{Prettytable}}
|constants={{LSL Constants/Parcel Media|all|b=*}}
!Constant
!Parameter
!Value
!Description
{{!}}-
{{!}} colspan="2" {{!}}{{LSLG|PARCEL_MEDIA_COMMAND_STOP}}
{{!}}0
{{!}}Stop the media stream and go back to the first frame.
{{!}}-
{{!}} colspan="2" {{!}}{{LSLG|PARCEL_MEDIA_COMMAND_PAUSE}}
{{!}}1
{{!}}Pause the media stream (stop playing but stay on current frame).
{{!}}-
{{!}} colspan="2" {{!}}{{LSLG|PARCEL_MEDIA_COMMAND_PLAY}}
{{!}}2
{{!}}Start the media stream playing from the current frame and stop when the end is reached.
{{!}}-
{{!}} colspan="2" {{!}}{{LSLG|PARCEL_MEDIA_COMMAND_LOOP}}
{{!}}3
{{!}}Start the media stream playing from the current frame. When the end is reached, loop to the beginning and continue.
{{!}}-
{{!}}{{LSLG|PARCEL_MEDIA_COMMAND_TEXTURE}}
{{!}}key uuid
{{!}}4
{{!}}Use this to get or set the parcel's media texture.
{{!}}-
{{!}}{{LSLG|PARCEL_MEDIA_COMMAND_URL}}
{{!}}string url
{{!}}5
{{!}}Used to get or set the parcel's media url.
{{!}}-
{{!}}{{LSLG|PARCEL_MEDIA_COMMAND_TIME}}
{{!}}float time
{{!}}6
{{!}}Move a media stream to a specific time.
{{!}}-
{{!}}{{LSLG|PARCEL_MEDIA_COMMAND_AGENT}}
{{!}}key uuid
{{!}}7
{{!}}Applies the media command to the specified agent only.
{{!}}-
{{!}} colspan="2" {{!}}{{LSLG|PARCEL_MEDIA_COMMAND_UNLOAD}}
{{!}}8
{{!}}Completely unloads the movie and restores the original texture.
{{!}}-
{{!}} colspan="2" {{!}}{{LSLG|PARCEL_MEDIA_COMMAND_AUTO_ALIGN}}
{{!}}9
{{!}}Sets the parcel option 'Auto scale content'.
{{!}}}  
|spec
|spec
|caveats= * This script's object must be owned by the landowner or the function will silently fail.
|caveats= * This script's object must be owned by the landowner or the function will silently fail.
* If the land is over group owned land, then this object must be deeded to '''that''' group.
* If the script's object is over group owned land, then the object must be deeded to '''that''' group.
|examples=<pre>
* If the [[PARCEL_MEDIA_COMMAND_URL]] value is greater than 254 characters, the command will silently fail.
* If using [[PARCEL_MEDIA_COMMAND_URL]] and [[PARCEL_MEDIA_COMMAND_AGENT]], make sure the ''Media URL'' in the ''About Land ...'' dialog is unset. See {{JIRA|SVC-4478}}.
|examples=
<source lang="lsl2">
key myTexture = llGetTexture(0);
key myTexture = llGetTexture(0);
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_TEXTURE,myTexture,PARCEL_MEDIA_COMMAND_PLAY]);
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_TEXTURE,myTexture,PARCEL_MEDIA_COMMAND_PLAY]);
</pre>
</source>
|helpers
|helpers
|also_header
|also_header
Line 76: Line 30:
|also_footer
|also_footer
|notes
|notes
|issues
|mode
|mode
|deprecated
|deprecated
Line 82: Line 37:
|cat1=Video
|cat1=Video
|cat2=Media
|cat2=Media
|cat3
|cat3=Parcel
|cat4
|cat4
}}
}}

Latest revision as of 13:07, 22 January 2015

Summary

Function: llParcelMediaCommandList( list commandList );
2.0 Forced Delay
10.0 Energy

Controls the playback of movies and other multimedia resources on a parcel or for an agent.

• list commandList A list of integer PARCEL_MEDIA_COMMAND_* flags and their parameters

Constant Parameter Description
0 PARCEL_MEDIA_COMMAND_STOP Stop the media stream and go back to the first frame.
1 PARCEL_MEDIA_COMMAND_PAUSE Pause the media stream (stop playing but stay on current frame).
2 PARCEL_MEDIA_COMMAND_PLAY Start the media stream playing from the current frame and stop when the end is reached.
3 PARCEL_MEDIA_COMMAND_LOOP Start the media stream playing from the current frame. When the end is reached, loop to the beginning and continue.
4 PARCEL_MEDIA_COMMAND_TEXTURE key uuid Used to get or set the parcel's media texture.
5 PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url.
6 PARCEL_MEDIA_COMMAND_TIME float time Move a media stream to a specific time in (floating point) seconds.
7 PARCEL_MEDIA_COMMAND_AGENT key uuid Applies the media command to the specified agent only.
8 PARCEL_MEDIA_COMMAND_UNLOAD Used to unload the movie and restores the original texture.
9 PARCEL_MEDIA_COMMAND_AUTO_ALIGN integer boolean Used to set the parcel option 'Auto scale content'.
10 PARCEL_MEDIA_COMMAND_TYPE string mime_type Used to get or set the parcel media MIME type (e.g. "text/html"). (1.19.1 RC0 or later)
11 PARCEL_MEDIA_COMMAND_SIZE integer x, integer y Used to get or set the parcel media pixel resolution. (1.19.1 RC0 or later)
12 PARCEL_MEDIA_COMMAND_DESC string desc Used to get or set the parcel media description. (1.19.1 RC0 or later)
13 PARCEL_MEDIA_COMMAND_LOOP_SET float loop Used to get or set the parcel's media loop duration. (1.19.1 RC0 or later)

Caveats

  • This function causes the script to sleep for 2.0 seconds.
  • This script's object must be owned by the landowner or the function will silently fail.
  • If the script's object is over group owned land, then the object must be deeded to that group.
  • If the PARCEL_MEDIA_COMMAND_URL value is greater than 254 characters, the command will silently fail.
  • If using PARCEL_MEDIA_COMMAND_URL and PARCEL_MEDIA_COMMAND_AGENT, make sure the Media URL in the About Land ... dialog is unset. See SVC-4478.

Examples

key myTexture = llGetTexture(0);
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_TEXTURE,myTexture,PARCEL_MEDIA_COMMAND_PLAY]);

See Also

Functions

•  llParcelMediaQuery
•  llSetTextureAnim
•  llSetTexture

Deep Notes

Signature

function void llParcelMediaCommandList( list commandList );