<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ssl-webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js"></script>
<script type="text/javascript" src="https://www.reallusion.com/crazytalk/Unity/samplecode/CTWebPlayer.min.js"></script>
<script type="text/javascript">
var player = new CTWebPlayer();
$(function () {
player.playerUrl = "https://www.reallusion.com/crazytalk/Unity/samplecode/CTWebPlayer.unity3d";
PlayerInit();
});
function Show() {
$("#unityPlayer").show();
PlayerInit();
}
function Hide() {
$("#unityPlayer").hide();
}
function PlayerInit() {
player.init($("#unityPlayer"), function () {
player.loadProject("https://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode12/display_player.uctproject",
{
playAfter: 0,
idleMotionUrl: "https://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode12/male.uctidle"
});
});
}
</script>
</head>
<body>
<table style="text-align:center;margin-left:auto; margin-right:auto;">
<tr>
<td>
<div id="unityPlayer" style="width: 640px; height: 480px;">
</div>
</td>
</tr>
<tr>
<td>
<input type="button" value="Show" onclick="Show()" class="button" />
<input type="button" value="Hide" onclick="Hide()" class="button" />
</td>
</tr>
</table>
</body>
</html>