Last active
August 29, 2015 14:16
-
-
Save nebadon2025/3a9fb4e2bff4e662ba58 to your computer and use it in GitHub Desktop.
Youtube Owner Controlled Projector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // need to replace the below "youtubecode" variable with the code from youtube URL | |
| // ie : https://www.youtube.com/watch?v=io3BrAQl3so the code is "io3BrAQl3so" | |
| string youtubecode = "io3BrAQl3so"; | |
| key theVideoTexture = "f12630aa-3102-4f03-8854-73fb6f933209"; | |
| string type = "text/html"; | |
| key owner; | |
| key clicker; | |
| PlayVideo( key theAvatar ) { | |
| string VideoBaseUrl = "http://www.youtube.com/embed/" + youtubecode + "?rel=0&autoplay=1;fs=0;autohide=0;hd=0;html5=1;"; | |
| llParcelMediaCommandList([ | |
| // PARCEL_MEDIA_COMMAND_AGENT, theAvatar, | |
| PARCEL_MEDIA_COMMAND_TEXTURE, theVideoTexture, | |
| PARCEL_MEDIA_COMMAND_URL, VideoBaseUrl, | |
| PARCEL_MEDIA_COMMAND_LOOP, | |
| PARCEL_MEDIA_COMMAND_TYPE, type, | |
| PARCEL_MEDIA_COMMAND_AUTO_ALIGN, 1 | |
| ]); | |
| } | |
| default { | |
| touch_start( integer numTouchers ) { | |
| integer i; | |
| owner = llGetOwner(); | |
| clicker = llDetectedKey(0); | |
| if (owner == clicker) | |
| { | |
| for (i = 0; i < numTouchers; ++i) { | |
| PlayVideo( llDetectedKey( i )); | |
| } | |
| } | |
| else | |
| { | |
| llSay(0, "You are not the owner of this screen!!"); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment