Deploying castaways on your web site couldn't be easier. Our code wizard will generate all of the HTML code for you. All you have to do is copy and paste that code into your web page in the desired position.
The code wizard also gives you the option to adjust the auto-close timeout if the default 15 seconds is not suitable.
Don't like the default close button? You can change it by going to Settings > Basic > Code Wizard
The ability to include a JavaScript callback function in custom creatives is useful to stop audio or video from playing promptly when the castaway is closed by the user:
<script type="text/javascript">
function castawayCloseCallback() {
// your custom close logic here...
}
</script>
Remember this needs to be a global function in order for it to be visible to the castaway wrapper code. Using this callback is not necessary with HTML5 banners or video banners. Those types of banners are designed to destroy any audio/video components upon closing so they stop playing automatically.