Difference between revisions of "Shared Media wrapper"
Line 32: | Line 32: | ||
</pre> | </pre> | ||
Replace the two instances of <code>http://torley.s3.amazonaws.com/panoramas/Here.swf</code> with your own URL. | Replace the two instances of <code>http://torley.s3.amazonaws.com/panoramas/Here.swf</code> with your own URL. What this code does: | ||
* Removes the white border that would be present by default around the edges of the Flash object. | |||
* Centers the content on the prim. Not always required but there if you ''do'' need it, like if you're including additional text or embedding an object that fills the vertical but not the horizontal space. | |||
Depending on the source embed code, you may be able to completely replace the stuff between the <code><object></code> tags. For example, this is for a Vimeo video: | |||
Experiment and see! | |||
== See also == | |||
* '''[https://blogs.secondlife.com/community/community/tnt/blog/2010/03/16/viewer-2-tip-shared-media-show-youtube-on-a-full-prims-face Show YouTube on a full prim's face]''' - YouTube, unlike some sites, has a built-in "show Flash movie on a full page" setup so you may not need the above. | |||
[[Category:Shared Media]] | [[Category:Shared Media]] |
Revision as of 11:25, 24 March 2010
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. What this code does:
- Removes the white border that would be present by default around the edges of the Flash object.
- Centers the content on the prim. Not always required but there if you do need it, like if you're including additional text or embedding an object that fills the vertical but not the horizontal space.
Depending on the source embed code, you may be able to completely replace the stuff between the <object>
tags. For example, this is for a Vimeo video:
Experiment and see!
See also
- Show YouTube on a full prim's face - YouTube, unlike some sites, has a built-in "show Flash movie on a full page" setup so you may not need the above.