<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";
$("#ckSetLoop").click(function () {
if ($(this).prop("checked")) {
player.setLoop(true);
}
else {
player.setLoop(false);
}
});
player.init($("#unityPlayer"), function () {
player.loadProject("https://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode8/Interaction_volume.uctproject",
{
playAfter: 0,
idleMotionUrl: "https://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode8/female.uctidle"
});
});
});
function SetVolume() {
player.setVolume(20);
}
</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="SetVolume" onclick="SetVolume()" class="button" />
<label>
<input id="ckSetLoop" type="checkbox" />
Set Loop
</label>
</td>
</tr>
</table>
</body>
</html>