There is a very little known feature of Second Life to do with showing video in world, this is the ability to show different videos to individual avatars on the same land parcel. I’ve mentioned this to a quite a few people now and all have been in disbelief, even some of the Lindens seem to be unaware of this feature.
The method to do this however is not a hack and has in fact been documented in the LSL API for as long as I know.
The method in question can be discovered by looking at the documentation for llParcelMediaCommandList if you have a close look at the parameters there is one called
PARCEL_MEDIA_COMMAND_AGENT
the description for which is “Applies the media command to the specified agent only.”
So lets look at a quick simple example.
We need a screen that can listen for urls over chat and then set the url for the person speaking. ( The screen must be owned by someone who has media permission on the land )
The script for the screen is …
integer listen_handle;
default
{
state_entry()
{
listen_handle = llListen(10, “”, “”, “”);
}touch_start(integer total_number)
{
llSay(0, “talk on channel 10 to set your personal video for this land”);
}listen( integer channel, string name, key id, string message )
{
llSay(0, “Setting Video play back to ” + message);
llParcelMediaCommandList( [
PARCEL_MEDIA_COMMAND_URL, message,
PARCEL_MEDIA_COMMAND_AGENT, id,
PARCEL_MEDIA_COMMAND_TEXTURE, (key) llGetTexture(0) ] );
}}
Here’s a quick side by side screenshot of two AVs watching a different movie at the same time on the same parcel of land.
Extra points for guessing what movie trailers they are watching
Tags: lsl, scripting, secondlife, streaming, video, virtualworlds



5 comments
Comments feed for this article
Trackback link
http://robsmart.co.uk/2007/10/27/second-life-hidden-video-secrets/trackback/
October 28, 2007 at 12:26 pm
Pingback from OLE genesis » Archives » video secrets in SL
February 16, 2008 at 9:45 pm
Expletive Acronym
I can finally watch porn on PG land?
WIN!
February 19, 2008 at 7:56 pm
Peter Weiss
the female avi is looking on the right screen and the male Avatar is
looking on the left screen *somuchforextrapoints .. but mayby you
can contact me InWorld and give me a hint how to get this script
running (syntax error 6,33) ..
February 22, 2008 at 4:40 pm
Peter Weiss
OK, i found the error you get if you are using that code from the Website.
The quotes character “” used in the example script on that Website must be replaced with the real quotes character ” .. but anyhow can not get it to work.
Also tried it out with an ALT Account .. Anybody has an idea ?
I post the quota replaced code here added some debug messages:
integer listen_handle;
default
{
state_entry()
{
listen_handle = llListen(10, “”, “”, “”);
}
touch_start(integer total_number)
{
llSay(0, “talk on channel 10 to set your personal video for this land”);
llSay(0, “Avatar that touched me”+(string)llDetectedKey(0));
}
listen( integer channel, string name, key id, string message )
{
llSay(0, “Setting Video play back to ” + message);
llParcelMediaCommandList( [
PARCEL_MEDIA_COMMAND_URL, "message",
PARCEL_MEDIA_COMMAND_AGENT, (string)llDetectedKey(0),
PARCEL_MEDIA_COMMAND_TEXTURE, (key) llGetTexture(0) ] );
}
}
When i click on the Prim the Script listens on Channel 10.
I used /10 http://www.myserver/myvideo.mp4 in the Chat
(this is an example i used a correct url for that) and the object
responds with the correct message but the video stream will not
be switched. I tried it with an object deeded to my land and also
with a prim not deeded to my land.
what am i missing ?
best regards
February 22, 2008 at 7:27 pm
Rob
Hi Peter,
In the version you’ve posted there are quotes around “message” in the llParcelMediaCommandList
llParcelMediaCommandList( [
PARCEL_MEDIA_COMMAND_URL, “message”,
PARCEL_MEDIA_COMMAND_AGENT, (string)llDetectedKey(0),
PARCEL_MEDIA_COMMAND_TEXTURE, (key) llGetTexture(0) ] );
}
it should be
llParcelMediaCommandList( [
PARCEL_MEDIA_COMMAND_URL, message,
PARCEL_MEDIA_COMMAND_AGENT, id,
PARCEL_MEDIA_COMMAND_TEXTURE, (key) llGetTexture(0) ] );
}
with no quotes around message…
hope this helps