Shared Media wrapper

From Second Life Wiki
Revision as of 11:19, 24 March 2010 by Torley Linden (talk | contribs)
Jump to navigation Jump to search

A situation that's becoming increasingly common: say you want to show a Flash object, like a video, and only that content on a prim's face via Shared Media.

However, if you enter in a normal URL, like http://youtube.com/watch?v=cWLeJ4xziwo , it shows everything on the page.

You might think, "Maybe I can just directly link to the Flash file?" Shared Media in its current implementation doesn't officially support direct-linking to FLV/SWF files. (When Torley tested this, it worked on Mac but not Windows.)

What you can do that achieves the same end result is use a wrapper.

Basically, you place the code you want within the wrapper, then paste the whole thing as a data URI or put it on a webpage by itself.

Wrappers

Here's Torley's 1st pass at a wrapper. Surely it can be optimized and improved upon — if you've adapted it, add your version below!

<html>
 <head>
  <title>Wrapper</title>
 </head>
 <body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" style="overflow:hidden">
  <div align="center">

   <object width="100%" height="100%">
   <param name="movie" value="http://torley.s3.amazonaws.com/panoramas/Here.swf">
   <embed src="http://torley.s3.amazonaws.com/panoramas/Here.swf" width="100%" height="100%" type="application/x-shockwave-flash">
   </embed>
   </object>
 
  </div>
 </body>
</html>

Replace the two instances of http://torley.s3.amazonaws.com/panoramas/Here.swf with your own URL.