- Webmasters, please read below for technical information on how to embed the 3DVIA Player.
- Version:
- Posted on:
How to insert a Virtools composition (VMO file) into a Web page:
First, include JavaScript files, which contain a set of functions and variables to generate HTML code related to the 3DVIA Player.
<head> <script src="http://3dlifeplayer.dl.3dvia.com/player/install/DetectBrowser.js"></script> <script src="http://3dlifeplayer.dl.3dvia.com/player/install/3DLifePlayer_last_version.js"></script> <script src="http://3dlifeplayer.dl.3dvia.com/player/install/3DLifePlayer.js"></script> </head>
Then, call a JavaScript function to generate the HTML code embedding the 3DVIA Player (depending on the end user browser), specifying:
- the VMO's URL (relative or absolute path) ("3dlifeplayer.vmo" in the following sample)
- the VMO's window size in pixels (256,80 in the following sample) and
- the plugin instance name ("Virtools" in the following sample).
(Items in bold need to be edited with your content)
<script language="JavaScript">
Generate3DLifePlayerHtmlTag("3dlifeplayer.vmo",256,80,"Virtools");
</script>
IMPORTANT: HIGHLY RECOMMENDED: To improve the integration of the 3DVIA Player in Firefox (and other Gecko-based browsers) under Microsoft Windows, we recommend the following: The integration of the 3DVIA Player into your website should be divided in two parts.
1- A first HTML page (install.html) used to check the 3DVIA Player installation or if it's the player's last version. This page can look like the following sample:
<html>
<head>
<script src="http://3dlifeplayer.dl.3dvia.com/player/install/DetectBrowser.js"></script>
<script src="http://3dlifeplayer.dl.3dvia.com/player/install/3DLifePlayer_last_version.js"></script>
<script src="http://3dlifeplayer.dl.3dvia.com/player/install/3DLifePlayer.js"></script>
</head>
<body>
<script language="JavaScript">
redirectionURL = "http://www.website.com/player/run.html";
Generate3DLifePlayerHtmlTagForInstall("<img src='install_now.gif' width='110' height='26' border='0' alt='Click the button to begin installation.'>");
</script>
</body>
</html>
2- A second HTML page (run.html) which runs the 3DVIA Player. The first page (install.html) redirects the user to this page once the 3DVIA Player version has been checked or when the 3DVIA Player has been installed (modifying the variable redirectionURL). This page can look like the following sample:
<html>
<head>
<script src="http://3dlifeplayer.dl.3dvia.com/player/install/DetectBrowser.js"></script>
<script src="http://3dlifeplayer.dl.3dvia.com/player/install/3DLifePlayer_last_version.js"></script>
<script src="http://3dlifeplayer.dl.3dvia.com/player/install/3DLifePlayer.js"></script>
</head>
<body>
<script language="JavaScript">
Generate3DLifePlayerHtmlTag("3dlifeplayer.vmo",256,80,"Virtools");
</script>
</body>
</html>
